Skip site navigation (1) Skip section navigation (2)

Re: detecting serials in 8.1

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: detecting serials in 8.1
Date: 2006-02-20 22:47:20
Message-ID: 43FA46F8.9010102@pse-consulting.de (view raw or flat)
Thread:
Lists: pgadmin-hackers
Kris Jurka wrote:
> Andreas Pflug wrote:
>
>> It's _always_ fine, because GetSchema obeys the search path and the 
>> reengineered SQL is meant to be used in a search path situation as it 
>> was at the time of reengineering. There are plenty of other 
>> situations where the reduced form (omitting search-pathed schema) 
>> won't work.
>>
>
> Let me back up and make clear what I'm saying.  The code I originally 
> submitted is not correct.  The code you committed is not correct 
> either.  To correctly determine what the default value for a serial 
> will look like, you need to know what the search_path was at table 
> creation time.  Knowing its current value is not relevent.
>
> Run the following in psql.
>
> SET search_path TO public;
> CREATE schema s1;
> CREATE TABLE s1.t1(a serial);
> SET search_path TO s1;
> CREATE TABLE s1.t2(a serial);
> \d t1
> \d t2
>
> Note how one default includes the schema and the other doesn't.  
> Explain how pgadmin can correctly determine the default value for both 
> of these tables.
The problem of non-standard serials using pg_depend is on the TODO-list. 
AFAICS the current implementation is better than before, and I don't 
think adding more brains to this inferiour pattern matching approach 
wouldn't make things better.

Regards,
Andreas


In response to

pgadmin-hackers by date

Next:From: August ZajoncDate: 2006-02-20 22:49:00
Subject: Small update to README.admin81
Previous:From: Dave PageDate: 2006-02-20 20:33:47
Subject: Re: Query tool results in grid

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group