Re: [GENERAL] Default value of serial fields changes after restore

2012-07-19 Thread Tom Lane
Scott Marlowe writes: > On Thu, Jul 19, 2012 at 1:13 PM, Tom Lane wrote: >> This claim is utter nonsense. If you are having a problem it's not due >> to the way regclass literals print. Please show a complete example of >> something failing. > Is it possible the OP has an "alter user set searc

Re: [GENERAL] Default value of serial fields changes after restore

2012-07-19 Thread Scott Marlowe
On Thu, Jul 19, 2012 at 1:13 PM, Tom Lane wrote: > Luiz Damim writes: >> After restore, default_value changes to >> nextval('testtable_id_seq'::regclass) and INSERT's start to fail as the >> sequence canĀ“t be found on it's schema. > > This claim is utter nonsense. If you are having a problem it'

Re: [GENERAL] Default value of serial fields changes after restore

2012-07-19 Thread Tom Lane
Luiz Damim writes: > Today I found a strange behavior after restoring a PostgreSQL database: the > schema of all serialfields default values are trimmed out. I don't think anything's being "trimmed out". It's the normal behavior of regclass literals to not print the schema if the table (or seque

[GENERAL] Default value of serial fields changes after restore

2012-07-19 Thread Luiz Damim
Today I found a strange behavior after restoring a PostgreSQL database: the schema of all serialfields default values are trimmed out. For example: CREATE TABLE testschema.testtable ( id serial, name character varying(255), CONSTRAINT pk_testtable PRIMARY KEY (id) ) WITH ( OIDS = FALSE