summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-03-24 19:24:27 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-03-24 19:24:27 +0000
commit748f9b9acfdccf614342aae71c33f4d28df0f471 (patch)
tree347302f584a4855b44a218c2ce1e32b107ad86c6 /lib/sqlalchemy/databases/postgres.py
parente07cf69deff7e2a9152b41385c4505f1acaa958b (diff)
downloadsqlalchemy-748f9b9acfdccf614342aae71c33f4d28df0f471.tar.gz
- column labels are now generated in the compilation phase, which
means their lengths are dialect-dependent. So on oracle a label that gets truncated to 30 chars will go out to 63 characters on postgres. Also, the true labelname is always attached as the accessor on the parent Selectable so theres no need to be aware of the genrerated label names [ticket:512]. - ResultProxy column targeting is greatly simplified, and relies upon the ANSICompiler's column_labels map to translate the built-in label on a _ColumnClause (which is now considered to be a unique identifier of that column) to the label which was generated at compile time. - still need to put a baseline of ColumnClause targeting for ResultProxy objects that originated from a textual query.
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py
index 93f20889c..43d570070 100644
--- a/lib/sqlalchemy/databases/postgres.py
+++ b/lib/sqlalchemy/databases/postgres.py
@@ -279,6 +279,9 @@ class PGDialect(ansisql.ANSIDialect):
def create_execution_context(self):
return PGExecutionContext(self)
+ def max_identifier_length(self):
+ return 68
+
def type_descriptor(self, typeobj):
if self.version == 2:
return sqltypes.adapt_type(typeobj, pg2_colspecs)