Re: [SQL] Table versions

2003-10-29 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > This still suffers from one major deficiency. The order that objects are > outputed isn't necessarily consistent between databases. If I add tables to > the development server but then add them to the production server in a > different order the schema still

Re: [SQL] Table versions

2003-10-29 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Returning to the original problem, it seems to me that comparing "pg_dump > -s" output is a reasonable way to proceed. I've actually started checking in a pg_dump -s output file into my CVS tree. However I prune a few key lines from it. I prune the TOC O

Re: [SQL] Table versions

2003-10-29 Thread Stef
Thanks guys, I had a feeling this was the case, but wasn't sure. The one-version pg_dump looks like a winner. Regards Stefan ##START## => Rod Taylor <[EMAIL PROTECTED]> writes: => >> What I did next, is put a trigger on pg_attribute that should, in theory, => >> on insert and update, fire up a f

Re: [SQL] Table versions

2003-10-29 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: >> What I did next, is put a trigger on pg_attribute that should, in theory, >> on insert and update, fire up a function that will increment a version > System tables do not use the same process for row insertion / updates as > the rest of the system. You're

Re: [SQL] Table versions

2003-10-29 Thread Rod Taylor
> What I did next, is put a trigger on pg_attribute that should, in theory, > on insert and update, fire up a function that will increment a version System tables do not use the same process for row insertion / updates as the rest of the system. You're trigger will rarely be fired. signature.asc

Re: [SQL] Table versions

2003-10-29 Thread Stef
Correction on the function : The function currently on the database did has select int4(description) + 1 into v_new_version from pg_description where objoid = NEW.attrelid; in stead of select int4(description) into v_new_version from pg_description where objoid = NEW

[SQL] Table versions

2003-10-29 Thread Stef
Hi all, I'm trying to create some kind of table version control system for approximately 300 postgres databases ranging in version from 7.1.2 to 7.3.4. I compared the "pg_dump -s" output between the various versions of databases, but the format is inconsistent, and I can't do diff's to check th