Re: detecting serials in 8.1 - Mailing list pgadmin-hackers

From Kris Jurka
Subject Re: detecting serials in 8.1
Date
Msg-id 43F8EDB9.3010507@ejurka.com
Whole thread Raw
In response to Re: detecting serials in 8.1  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: detecting serials in 8.1  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgadmin-hackers
Andreas Pflug wrote:
> Kris Jurka wrote:
>> 8.1 has changed the default text for serials from something like
>> nextval('public.tab_col_seq'::text) to nextval('tab_col_seq'::regclass)
>
>
> Applied with editing (didn't check for schema).

Actually it turns out that whether the schema gets in there or not
depends on the search path when the table is created.  Consider the
following code:


CREATE schema s1;
CREATE schema s2;

SET search_path TO 's1';

CREATE TABLE t1 (a serial);
CREATE TABLE s2.t2 (a serial);

SET search_path TO 'public';

SELECT relname,attname,adsrc
FROM pg_class c, pg_attribute a, pg_attrdef d
WHERE c.oid = d.adrelid AND c.oid = a.attrelid
    AND a.attnum = d.adnum
    AND c.relname IN ('t1','t2');

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by andreas: r5009 - trunk/pgadmin3/src/schema
Next
From: "Dave Page"
Date:
Subject: Re: SVN Commit by dpage: r5003 - in trunk/pgadmin3: . src/base