Update of /cvsroot/php-blog/serendipity/include/db
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15857
Modified Files:
postgres.inc.php
Log Message:
OIDS seem to be deprecated in latest postgresql versions, but there seems to be no way to get the last insert primary id from an INSERT statement with postgreSQL.
So we enable OIDS for our serendipity create/insert statements here.
Index: postgres.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/db/postgres.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- postgres.inc.php 26 Jan 2005 14:14:06 -0000 1.10
+++ postgres.inc.php 16 Feb 2005 12:56:42 -0000 1.11
@@ -98,6 +98,11 @@
'both' => PGSQL_BOTH
);
+ if (!isset($serendipity['dbPgsqlOIDS'])) {
+ $serendipity['dbPgsqlOIDS'] = true;
+ @serendipity_db_query('SET default_with_oids = true', true, 'both', false, false, false, true);
+ }
+
if (!$expectError && ($reportErr || !$serendipity['production'])) {
$serendipity['dbLastResult'] = pg_query($serendipity['dbConn'], $sql);
} else {
|