Skip to content

Commit db8743d

Browse files
committed
Updated examples to use Psycopg 3 [skip ci]
1 parent a7ac6d7 commit db8743d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/implicit_recs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sqlalchemy import create_engine, select, text, Integer, String
55
from sqlalchemy.orm import declarative_base, mapped_column, Session
66

7-
engine = create_engine('postgresql+psycopg2://localhost/pgvector_example')
7+
engine = create_engine('postgresql+psycopg://localhost/pgvector_example')
88
with engine.connect() as conn:
99
conn.execute(text('CREATE EXTENSION IF NOT EXISTS vector'))
1010
conn.commit()

examples/lightfm_recs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sqlalchemy import create_engine, select, text, Float, Integer, String
55
from sqlalchemy.orm import declarative_base, mapped_column, Session
66

7-
engine = create_engine('postgresql+psycopg2://localhost/pgvector_example')
7+
engine = create_engine('postgresql+psycopg://localhost/pgvector_example')
88
with engine.connect() as conn:
99
conn.execute(text('CREATE EXTENSION IF NOT EXISTS vector'))
1010
conn.commit()

examples/surprise_recs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from sqlalchemy.orm import declarative_base, mapped_column, Session
44
from surprise import Dataset, SVD
55

6-
engine = create_engine('postgresql+psycopg2://localhost/pgvector_example')
6+
engine = create_engine('postgresql+psycopg://localhost/pgvector_example')
77
with engine.connect() as conn:
88
conn.execute(text('CREATE EXTENSION IF NOT EXISTS vector'))
99
conn.commit()

0 commit comments

Comments
 (0)