summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Hall <daniel.hall@moesol.com>2022-06-28 15:03:34 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-06-28 15:06:29 -0400
commit4d6efd06aa87cbbe2b42df260376acf43e30c308 (patch)
treec94b8191e4d25d8cdb10243d8a54383e9b5803fd /lib
parentf19e50ab75cfc904acef31434c92542f3ab50d61 (diff)
downloadsqlalchemy-4d6efd06aa87cbbe2b42df260376acf43e30c308.tar.gz
8152: add documentation for postgresql dialect time and timestamp types
add documentation for postgresql dialect time and timestamp types This pull request is: - [ X] A documentation / typographical error fix - Good to go, no issue or tests are needed **Have a nice day!** Closes: #8185 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8185 Pull-request-sha: 2b76fe080babd72f8e5615b34cb544abbc446a28 Change-Id: Ib71b35d106d0d0686e5551f07b88486b6c59624d
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/types.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/types.py b/lib/sqlalchemy/dialects/postgresql/types.py
index 374adcac1..81b677187 100644
--- a/lib/sqlalchemy/dialects/postgresql/types.py
+++ b/lib/sqlalchemy/dialects/postgresql/types.py
@@ -114,13 +114,39 @@ class REGCLASS(sqltypes.TypeEngine[str]):
class TIMESTAMP(sqltypes.TIMESTAMP):
+
+ """Provide the PostgreSQL TIMESTAMP type."""
+
+ __visit_name__ = "TIMESTAMP"
+
def __init__(self, timezone=False, precision=None):
+ """Construct a TIMESTAMP.
+
+ :param timezone: boolean value if timezone present, default False
+ :param precision: optional integer precision value
+
+ .. versionadded:: 1.4
+
+ """
super(TIMESTAMP, self).__init__(timezone=timezone)
self.precision = precision
class TIME(sqltypes.TIME):
+
+ """PostgreSQL TIME type."""
+
+ __visit_name__ = "TIME"
+
def __init__(self, timezone=False, precision=None):
+ """Construct a TIME.
+
+ :param timezone: boolean value if timezone present, default False
+ :param precision: optional integer precision value
+
+ .. versionadded:: 1.4
+
+ """
super(TIME, self).__init__(timezone=timezone)
self.precision = precision