diff --git a/dbt/adapters/postgres/record/cursor/cursor.py b/dbt/adapters/postgres/record/cursor/cursor.py index fc13e3c..a7edfe2 100644 --- a/dbt/adapters/postgres/record/cursor/cursor.py +++ b/dbt/adapters/postgres/record/cursor/cursor.py @@ -6,6 +6,8 @@ class PostgresRecordReplayCursor(RecordReplayCursor): + """A custom extension of RecordReplayCursor that adds the statusmessage + property which is specific to psycopg.""" @property @record_function(CursorGetStatusMessageRecord, method=True, id_field_name="connection_name") def statusmessage(self): diff --git a/dbt/adapters/postgres/record/handle.py b/dbt/adapters/postgres/record/handle.py index c6a589a..d75e0e2 100644 --- a/dbt/adapters/postgres/record/handle.py +++ b/dbt/adapters/postgres/record/handle.py @@ -3,6 +3,9 @@ from dbt.adapters.postgres.record.cursor.cursor import PostgresRecordReplayCursor class PostgresRecordReplayHandle(RecordReplayHandle): + """A custom extension of RecordReplayHandle that returns + a psycopg-specific PostgresRecordReplayCursor object.""" + def cursor(self): cursor = None if self.native_handle is None else self.native_handle.cursor() return PostgresRecordReplayCursor(cursor, self.connection)