mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
* PostgreSQL: fix for SQL error eg. on update from 1.8.001 to 1.8.004 from 9.1 on
This commit is contained in:
parent
393d35657d
commit
8497dee410
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - Setup - db-schema-processor
|
||||
* EGroupware - Setup - db-schema-processor
|
||||
*
|
||||
* Originaly written by
|
||||
* - Michael Dean <mdean@users.sourceforge.net>
|
||||
@ -394,8 +394,8 @@ class schema_proc
|
||||
{
|
||||
if ($this->sType != 'pgsql') return false;
|
||||
|
||||
$seq = $this->adodb->GetOne("SELECT d.adsrc FROM pg_attribute a, pg_class c, pg_attrdef d WHERE c.relname='$sTableName' AND c.oid=d.adrelid AND d.adsrc LIKE '%seq_$sTableName\'::text)' AND a.attrelid=c.oid AND d.adnum=a.attnum");
|
||||
$seq2 = $this->adodb->GetOne("SELECT d.adsrc FROM pg_attribute a, pg_class c, pg_attrdef d WHERE c.relname='$sTableName' AND c.oid=d.adrelid AND d.adsrc LIKE '%$sTableName%_seq\'::text)' AND a.attrelid=c.oid AND d.adnum=a.attnum");
|
||||
$seq = $this->adodb->GetOne("SELECT d.adsrc FROM pg_attribute a, pg_class c, pg_attrdef d WHERE c.relname='$sTableName' AND c.oid=d.adrelid AND d.adsrc LIKE '%seq_$sTableName''::text)' AND a.attrelid=c.oid AND d.adnum=a.attnum");
|
||||
$seq2 = $this->adodb->GetOne("SELECT d.adsrc FROM pg_attribute a, pg_class c, pg_attrdef d WHERE c.relname='$sTableName' AND c.oid=d.adrelid AND d.adsrc LIKE '%$sTableName%_seq''::text)' AND a.attrelid=c.oid AND d.adnum=a.attnum");
|
||||
|
||||
if ($seq && preg_match('/^nextval\(\'(.*)\'/',$seq,$matches))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user