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');