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
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
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
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).