1 from typing import Any, Tuple, overload
4 import psycopg2.extensions
37 PYDATETIMETZARRAY: Any
42 REPLICATION_LOGICAL: int
43 REPLICATION_PHYSICAL: int
53 adapters: dict[Any, Any]
55 binary_types: dict[Any, Any]
56 encodings: dict[Any, Any]
58 sqlstate_errors: dict[Any, Any]
59 string_types: dict[Any, Any]
62 __libpq_version__: int
66 def __init__(self, *args, **kwargs) -> None: ...
67 def getquoted(self, *args, **kwargs): ...
68 def __conform__(self, *args, **kwargs): ...
73 def __init__(self, *args, **kwargs) -> None: ...
74 def getquoted(self, *args, **kwargs): ...
75 def prepare(self, conn): ...
76 def __conform__(self, *args, **kwargs): ...
80 def __init__(self, *args, **kwargs) -> None: ...
81 def getquoted(self, *args, **kwargs): ...
82 def __conform__(self, *args, **kwargs): ...
94 def __init__(self, *args, **kwargs) -> None: ...
95 def __eq__(self, other): ...
96 def __ge__(self, other): ...
97 def __getitem__(self, index): ...
98 def __getstate__(self): ...
99 def __gt__(self, other): ...
100 def __le__(self, other): ...
101 def __len__(self): ...
102 def __lt__(self, other): ...
103 def __ne__(self, other): ...
104 def __setstate__(self, state): ...
106 class ConnectionInfo:
116 protocol_version: Any
119 ssl_attribute_names: Any
122 transaction_status: Any
125 def __init__(self, *args, **kwargs) -> None: ...
126 def parameter_status(self, *args, **kwargs): ...
127 def ssl_attribute(self, *args, **kwargs): ...
129 class DataError(psycopg2.DatabaseError): ...
130 class DatabaseError(psycopg2.Error): ...
134 def __init__(self, *args, **kwargs) -> None: ...
135 def getquoted(self, *args, **kwargs): ...
136 def __conform__(self, *args, **kwargs): ...
143 internal_position: Any
150 severity_nonlocalized: Any
155 statement_position: Any
157 def __init__(self, *args, **kwargs) -> None: ...
159 class Error(Exception):
164 def __init__(self, *args, **kwargs) -> None: ...
165 def __reduce__(self): ...
166 def __setstate__(self, state): ...
170 def __init__(self, *args, **kwargs) -> None: ...
171 def getquoted(self, *args, **kwargs): ...
172 def __conform__(self, *args, **kwargs): ...
176 def __init__(self, *args, **kwargs) -> None: ...
177 def getbinary(self, *args, **kwargs): ...
178 def getbuffer(self, *args, **kwargs): ...
179 def getquoted(self, *args, **kwargs): ...
183 def __init__(self, *args, **kwargs) -> None: ...
184 def getquoted(self, *args, **kwargs): ...
185 def __conform__(self, *args, **kwargs): ...
187 class IntegrityError(psycopg2.DatabaseError): ...
188 class InterfaceError(psycopg2.Error): ...
189 class InternalError(psycopg2.DatabaseError): ...
193 def __init__(self, *args, **kwargs) -> None: ...
194 def getquoted(self, *args, **kwargs): ...
195 def prepare(self, *args, **kwargs): ...
196 def __conform__(self, *args, **kwargs): ...
198 class NotSupportedError(psycopg2.DatabaseError): ...
204 def __init__(self, *args, **kwargs) -> None: ...
205 def __eq__(self, other): ...
206 def __ge__(self, other): ...
207 def __getitem__(self, index): ...
208 def __gt__(self, other): ...
209 def __hash__(self): ...
210 def __le__(self, other): ...
211 def __len__(self): ...
212 def __lt__(self, other): ...
213 def __ne__(self, other): ...
215 class OperationalError(psycopg2.DatabaseError): ...
216 class ProgrammingError(psycopg2.DatabaseError): ...
217 class QueryCanceledError(psycopg2.OperationalError): ...
223 def __init__(self, *args, **kwargs) -> None: ...
224 def getquoted(self, *args, **kwargs): ...
225 def prepare(self, *args, **kwargs): ...
226 def __conform__(self, *args, **kwargs): ...
228 class ReplicationConnection(psycopg2.extensions.connection):
231 replication_type: Any
233 set_isolation_level: Any
235 def __init__(self, *args, **kwargs) -> None: ...
237 class ReplicationCursor(psycopg2.extensions.cursor):
238 feedback_timestamp: Any
241 def __init__(self, *args, **kwargs) -> None: ...
242 def consume_stream(self, consumer, keepalive_interval=...): ...
243 def read_message(self, *args, **kwargs): ...
244 def send_feedback(self, write_lsn=..., flush_lsn=..., apply_lsn=..., reply=..., force=...): ...
245 def start_replication_expert(self, command, decode=..., status_interval=...): ...
247 class ReplicationMessage:
254 def __init__(self, *args, **kwargs) -> None: ...
256 class TransactionRollbackError(psycopg2.OperationalError): ...
257 class Warning(Exception): ...
266 def __init__(self, *args, **kwargs) -> None: ...
267 def from_string(self, *args, **kwargs): ...
268 def __getitem__(self, index): ...
269 def __len__(self): ...
280 NotSupportedError: Any
281 OperationalError: Any
282 ProgrammingError: Any
297 protocol_version: Any
302 def __init__(self, *args, **kwargs) -> None: ...
303 def cancel(self, *args, **kwargs): ...
304 def close(self, *args, **kwargs): ...
305 def commit(self, *args, **kwargs): ...
307 def cursor(self) -> _cursor: ...
309 def cursor(self, name=..., cursor_factory: Any = ..., withhold=...) -> Any: ...
310 def fileno(self, *args, **kwargs): ...
311 def get_backend_pid(self, *args, **kwargs): ...
312 def get_dsn_parameters(self, *args, **kwargs): ...
313 def get_native_connection(self, *args, **kwargs): ...
314 def get_parameter_status(self, parameter): ...
315 def get_transaction_status(self): ...
316 def isexecuting(self, *args, **kwargs): ...
317 def lobject(self, oid=..., mode=..., new_oid=..., new_file=..., lobject_factory=...): ...
318 def poll(self, *args, **kwargs): ...
320 def rollback(self): ...
321 def set_client_encoding(self, encoding): ...
322 def set_isolation_level(self, level): ...
323 def set_session(self, *args, **kwargs): ...
324 def tpc_begin(self, xid): ...
325 def tpc_commit(self, *args, **kwargs): ...
326 def tpc_prepare(self): ...
327 def tpc_recover(self): ...
328 def tpc_rollback(self, *args, **kwargs): ...
329 def xid(self, format_id, gtrid, bqual): ...
330 def __enter__(self): ...
331 def __exit__(self, type, value, traceback): ...
353 def __init__(self, *args, **kwargs) -> None: ...
354 def callproc(self, procname, parameters=...): ...
355 def cast(self, oid, s): ...
357 def copy_expert(self, sql, file, size=...): ...
358 def copy_from(self, file, table, sep=..., null=..., size=..., columns=...): ...
359 def copy_to(self, file, table, sep=..., null=..., columns=...): ...
360 def execute(self, query, vars=...): ...
361 def executemany(self, query, vars_list): ...
362 def fetchall(self) -> list[Tuple[Any, ...]]: ...
363 def fetchmany(self, size=...) -> list[Tuple[Any, ...]]: ...
364 def fetchone(self) -> Tuple[Any, ...] | Any: ...
365 def mogrify(self, *args, **kwargs): ...
366 def nextset(self): ...
367 def scroll(self, value, mode=...): ...
368 def setinputsizes(self, sizes): ...
369 def setoutputsize(self, size, column=...): ...
370 def __enter__(self): ...
371 def __exit__(self, type, value, traceback): ...
372 def __iter__(self): ...
373 def __next__(self): ...
379 def __init__(self, *args, **kwargs) -> None: ...
381 def export(self, filename): ...
382 def read(self, size=...): ...
383 def seek(self, offset, whence=...): ...
385 def truncate(self, len=...): ...
386 def unlink(self): ...
387 def write(self, str): ...
389 def Date(year, month, day): ...
390 def DateFromPy(*args, **kwargs): ...
391 def DateFromTicks(ticks): ...
392 def IntervalFromPy(*args, **kwargs): ...
393 def Time(hour, minutes, seconds, tzinfo=...): ...
394 def TimeFromPy(*args, **kwargs): ...
395 def TimeFromTicks(ticks): ...
396 def Timestamp(year, month, day, hour, minutes, seconds, tzinfo=...): ...
397 def TimestampFromPy(*args, **kwargs): ...
398 def TimestampFromTicks(ticks): ...
399 def _connect(*args, **kwargs): ...
400 def adapt(*args, **kwargs): ...
401 def encrypt_password(*args, **kwargs): ...
402 def get_wait_callback(*args, **kwargs): ...
403 def libpq_version(*args, **kwargs): ...
404 def new_array_type(oids, name, baseobj): ...
405 def new_type(oids, name, castobj): ...
406 def parse_dsn(*args, **kwargs): ...
407 def quote_ident(*args, **kwargs): ...
408 def register_type(*args, **kwargs): ...
409 def set_wait_callback(_none): ...