phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-developers] Postres support -> Proposal


From: Benoit Hamet
Subject: Re: [phpGroupWare-developers] Postres support -> Proposal
Date: Wed, 18 Jun 2008 16:50:05 +0200
User-agent: IceDove 1.5.0.14eol (X11/20080509)

Hi Sigurd,

Sigurd Nes a écrit :
>> From: Benoit Hamet address@hidden
>> Sent: 2008-06-18 13:22:56 CEST
>> To: address@hidden
>> Subject: Re: [phpGroupWare-developers] Postres support / update DB to        
>> 0.9.18.015
>>
>> Can you give concrete example of problems ?
>>
> I don't have access to a pre 8.2 - but I think you can test the reporting of 
> constraints by navigate to setup/sqltoarray.php?appname=<your 
> favorite>&submit=True
> 
> you might want to have fk, uc, and ix on (some of) your tables.
Well, in my light application, no apps are using fk ... so was hard to
test. Anyway I add the constraints for acl_account to references
account_id into phpgw_account.account_id : Here the output on a pgsql 7.4 :
'phpgw_acl' => array(
  'fd' => array(
  'acl_account' => array('type' => 'int', 'precision' => 4,'nullable' =>
True),
  'acl_rights' => array('type' => 'int', 'precision' => 4,'nullable' =>
True),
  'acl_grantor' => array('type' => 'int', 'precision' => 4,'nullable' =>
True),
  'acl_type' => array('type' => 'int', 'precision' => 2,'nullable' => True),
  'location_id' => array('type' => 'int', 'precision' => 4,'nullable' =>
True)
 ),
  'pk' => array(),
  'fk' => array('phpgw_accounts' => array('acl_account' => 'account_id')),
  'ix' => array(acl_account),
  'uc' => array()
),

So it's working for install before 8.2
> 
> I had some problems with reporting on fk for version later than 8.2.
Hu, So I misunderstood you're previous point. You want to support pgsql
only until 8.2 ???

> I'm not sure (haven't looked into it recently )that adodb's MetaForeignKeys 
> returned a desired result.
> 
> There is some code from phpPgAdmin - that could be used - but that one 
> assumes that you are looking at nspname='public'

Sorry, I guess I'm totaly lost ...

In your first mail you were saying :
"
I propose to drop support for postgres prior to 8.2

There was a change in behavior regarding the use of oid that has impact
on class.db.inc.php (the get_last_insert_id) and
class.schema_proc_pgsql.inc.php for retrieving various meta data.
"
Ok, you are telling us, that version > 8.2 of pgsql are not working with
the actual code ... and your solution is to drop the working code ????

Well, let me think twice about that :
 - the get_last_insert_id : For me it's the adodb layer which is
responsible for these things, not "us". So if their code is broken, help
them to fix it, do not try to workaround in our code. Perhaps are we
misusing their code, in that case, we should fix it... For now I propose
that the code of that function being the following :
public function get_last_insert_id($table, $field)
{
  return $this->adodb->Insert_ID($table, $field);
}
and nothing else.
If you have STRONG arguments against it, give it to all of us, and we
will discuss and see. if no I will commit this in 2 weeks.

 - class.schema_proc_pgsql.inc.php : well I'm not sure that these
classes are still needed "like this" since they don't seems to use the
adodb layer but use SQL directly ... so I thing that updating them
should be done instead of only supporting a version of pgsql ... Will
try to look at it now.

Regards.

Caeies




reply via email to

[Prev in Thread] Current Thread [Next in Thread]