[Bast-commits] r7562 - DBIx-Class/0.08/branches/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI

rbuels at dev.catalyst.perl.org rbuels at dev.catalyst.perl.org
Fri Sep 4 17:43:19 GMT 2009


Author: rbuels
Date: 2009-09-04 17:43:17 +0000 (Fri, 04 Sep 2009)
New Revision: 7562

Modified:
   DBIx-Class/0.08/branches/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI/Pg.pm
Log:
added big block comment explaining Pg sequence discovery strategy

Modified: DBIx-Class/0.08/branches/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI/Pg.pm
===================================================================
--- DBIx-Class/0.08/branches/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI/Pg.pm	2009-09-04 17:43:08 UTC (rev 7561)
+++ DBIx-Class/0.08/branches/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI/Pg.pm	2009-09-04 17:43:17 UTC (rev 7562)
@@ -54,6 +54,22 @@
     ( $schema, $table ) = ( $1, $2 );
   }
 
+  # Build and execute a query into the pg_catalog to find the Pg
+  # expression for the default value for this column in this table.
+  # If the table name is schema-qualified, query using that specific
+  # schema name.
+
+  # Otherwise, find the table in the standard Postgres way, using the
+  # search path.  This is done with the pg_catalog.pg_table_is_visible
+  # function, which returns true if a given table is 'visible',
+  # meaning the first table of that name to be found in the search
+  # path.
+
+  # I *think* we can be assured that this query will always find the
+  # correct column according to standard Postgres semantics.
+  #
+  # -- rbuels
+
   my $sqlmaker = $self->sql_maker;
   local $sqlmaker->{bindtype} = 'normal';
 




More information about the Bast-commits mailing list