Re: [GENERAL] schema rename sequence issue

2006-01-31 Thread Sim Zacks
OK. This is working in my test environment. I changed the schema name I changed the binary and text description in the attrdef table. I subtract 1 from the number both before the [ and after the ] because my new schema has 1 letter less then the old schema. It seems to be working. Can anybody

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Sim Zacks
"I may not be a smart man, but I do know what love is" Of course I did this on a database that I didn't care about. This is my development machine. If it actually fully worked after testing, I would have considered moving it into production code. Is there a more approved way of doing this, bes

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Tom Lane
Sim Zacks <[EMAIL PROTECTED]> writes: > PostGreSQL 8.01 Gentoo > I renamed my schema from public to stock, and then I found out it didn't > change the schemas of the sequences. After searching through the > archives, I found that this was on a bug list and would probably be > fixed in version 8.

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Sim Zacks
It seems to be an in-memory issue or something like that. 5 hours later it gave me another error implying that it was reading the pg_attrdef table. Apparantly the first number in the byte string is the number of characters in the string, and since my new schema is 1 character shorter then the o

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Sim Zacks
Thank you for your thoughts, but I am hoping that I don't have to update 400 tables manually. The way I understand the postgresql structure is that each field is listed in the pg_attribute table and those fields with default values have records in the pg_attrdef table. I changed both the text and

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Michael Glaesemann
On Jan 30, 2006, at 19:03 , Sim Zacks wrote: I thought the pg_attrdef table was the defaults. Is there another table that contains the defaults What I'm thinking of is this situation: create table foo ( foo_id serial primary key , foo_value text not null unique ); This will

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Sim Zacks
I thought the pg_attrdef table was the defaults. Is there another table that contains the defaults Thank You Sim On Jan 30, 2006, at 18:51 , Sim Zacks wrote: > However, when I try to insert into the table I get an

Re: [GENERAL] schema rename sequence issue

2006-01-30 Thread Michael Glaesemann
On Jan 30, 2006, at 18:51 , Sim Zacks wrote: However, when I try to insert into the table I get an error that public.sequence name is not found Am I missing a reference or table update somewhere? You probably need to update the defaults for the columns that call the sequences. They may s