[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9212 - trunk/gnue-common/src/datasources/drivers/sql/postgresql
From: |
reinhard |
Subject: |
[gnue] r9212 - trunk/gnue-common/src/datasources/drivers/sql/postgresql |
Date: |
Fri, 5 Jan 2007 10:20:34 -0600 (CST) |
Author: reinhard
Date: 2007-01-05 10:20:34 -0600 (Fri, 05 Jan 2007)
New Revision: 9212
Modified:
trunk/gnue-common/src/datasources/drivers/sql/postgresql/Base.py
trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py
trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py
trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py
trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py
Log:
Optionally use OID's again for postgres.
Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/Base.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/Base.py
2007-01-05 16:08:58 UTC (rev 9211)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/Base.py
2007-01-05 16:20:34 UTC (rev 9212)
@@ -44,7 +44,8 @@
_behavior_ = Behavior.Behavior
- # The oid column is not created by default with Postgres >= 8.0
+ # The oid column is not created by default with Postgres >= 8.0, so don't use
+ # it by default.
# _rowidField_ = 'oid'
# ---------------------------------------------------------------------------
@@ -55,6 +56,10 @@
DBSIG2.Connection.__init__ (self, connections, name, parameters)
+ # Optionally the oid can be used as a rowid field.
+ if 'use_oid' in parameters:
+ self._rowidField = 'oid'
+
# Find out encoding for Postgres
if pg_encTable.has_key (self._encoding):
self._pg_encoding = pg_encTable [self._encoding]
Modified:
trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py
2007-01-05 16:08:58 UTC (rev 9211)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py
2007-01-05 16:20:34 UTC (rev 9212)
@@ -79,9 +79,10 @@
* dbname -- database name (required)
* host -- host address (defaults to UNIX socket if not provided) (optional)
* port -- port number (defaults to 5432 if not provided) (optional)
-* user -- user name used to authenticate
-* password -- password used to authenticate
-* sslmode -- SSL mode (see PostgreSQL documentation)
+* use_oid -- if set to any value, the driver uses Postgres' OID field as an
+ implicit primary key for all tables. OID fields were generated by default
+ for all tables for Postgres 7.x and are not generated by default for
+ Postgres 8.x.
Examples
--------
Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py
2007-01-05 16:08:58 UTC (rev 9211)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py
2007-01-05 16:20:34 UTC (rev 9212)
@@ -72,8 +72,12 @@
---------------------
* dbname -- This is the database to use (required)
* host -- This is the name of the database host, or, on Linux,
- directory containing the network socket (optional)
+ directory containing the network socket (optional)
* port -- Port that PostgreSQL is running on (defaults to 5432) (optional)
+* use_oid -- if set to any value, the driver uses Postgres' OID field as an
+ implicit primary key for all tables. OID fields were generated by default
+ for all tables for Postgres 7.x and are not generated by default for
+ Postgres 8.x.
Examples
--------
Modified:
trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py
2007-01-05 16:08:58 UTC (rev 9211)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py
2007-01-05 16:20:34 UTC (rev 9212)
@@ -71,8 +71,12 @@
---------------------
* dbname -- This is the database to use (required)
* host -- This is the name of the database host, or, on Linux,
- directory containing the network socket (optional)
+ directory containing the network socket (optional)
* port -- Port that PostgreSQL is running on (defaults to 5432) (optional)
+* use_oid -- if set to any value, the driver uses Postgres' OID field as an
+ implicit primary key for all tables. OID fields were generated by default
+ for all tables for Postgres 7.x and are not generated by default for
+ Postgres 8.x.
Examples
--------
Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py
2007-01-05 16:08:58 UTC (rev 9211)
+++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py
2007-01-05 16:20:34 UTC (rev 9212)
@@ -75,8 +75,12 @@
---------------------
* dbname -- This is the database to use (required)
* host -- This is the name of the database host, or, on Linux,
- directory containing the network socket (optional)
+ directory containing the network socket (optional)
* port -- Port that PostgreSQL is running on (defaults to 5432) (optional)
+* use_oid -- if set to any value, the driver uses Postgres' OID field as an
+ implicit primary key for all tables. OID fields were generated by default
+ for all tables for Postgres 7.x and are not generated by default for
+ Postgres 8.x.
Examples
--------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9212 - trunk/gnue-common/src/datasources/drivers/sql/postgresql,
reinhard <=