Re: [SQL] psql: no schema info

2008-04-28 Thread Richard Huxton
chester c young wrote: using 8.2 and 8.3 here's (psychological) problem as I see it: # set search_path=old_schema; # # create sequence new_schema.seq1; # # create table new_schema.table1( #col1 integer default nextval( 'seq1' ) # ); using old_schema.seq1, not new_schema.seq1 and imho to

Re: [SQL] psql: no schema info

2008-04-28 Thread Alvaro Herrera
chester c young wrote: # create table new_schema.table1( #col1 integer default nextval( 'seq1' ) # ); using old_schema.seq1, not new_schema.seq1 Yes, that's correct -- assuming you had an old_schema.seq1 sequence too. and imho to make matters more difficult to troubleshoot: # \dt

[SQL] psql: no schema info

2008-04-27 Thread chester c young
have several schemae, each with identical tables. in create scripts have been taking great care to fully qualify, eg, col1 references schema1.tab1( col1 ) however, just got burnt big time on sequences! need to qualify them as well, eg col1 integer default nextval( 'schema1.seq1' ) \dt is

Re: [SQL] psql: no schema info

2008-04-27 Thread Tom Lane
chester c young [EMAIL PROTECTED] writes: however, just got burnt big time on sequences! need to qualify them as well, eg col1 integer default nextval( 'schema1.seq1' ) Move to something newer than 8.0.x, and this is automatic (because nextval's argument is actually a regclass constant).