Re: from PG_DUMP to CVS
От | Josh Berkus |
---|---|
Тема | Re: from PG_DUMP to CVS |
Дата | |
Msg-id | 200408270902.20350.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Re: from PG_DUMP to CVS (Philip Warner <pjw@rhyme.com.au>) |
Ответы |
Re: from PG_DUMP to CVS
(Philip Warner <pjw@rhyme.com.au>)
|
Список | pgsql-sql |
Philip, > My thinking at this stage is to try to get pg_dump/restore to produce the > output directly. Something like: Hey, you do what you want, of course. However, it seems to me that hacking AutoDoc would be a *lot* less effort than hacking pg_dump. Interestingly, though, I was talking to someone on IRC (Neil? Gavin?) some 6 months ago or so about hacking a "PSQL-FS" that is, an interface to the *live* database which would look like a filesystem. Were this done, it would be child's play to rsync it with an archive. Whomever it was didn't seem to think it too challenging a task. > some-dbname/create.sql > some-dbname/drop.sql > some-dbname/econding.sql > ... > some-dbname/some-schema/TABLE/sometable/create.sql > some-dbname/some-schema/TABLE/sometable/drop.sql Hmmm. I see a slightly different structure below the schema level: some-dbname/some-schema/TABLES/sometable/create.sql some-dbname/some-schema/TABLES/sometable/indexes.sql some-dbname/some-schema/TABLES/sometable/constraints.sql some-dbname/some-schema/TABLES/sometable/triggers.sql some-dbname/some-schema/TABLES/sometable/rules.sql some-dbname/some-schema/VIEWS/someview/create.sql some-dbname/some-schema/VIEWS/someview/rules.sql some-dbname/some-schema/FUNCTIONS/somefunction/param{codes}.sql some-dbname/some-schema/TYPES/sometype/create.sql some-dbname/some-schema/OPERATORS/someoperator/create.sql However, the above is somewhat unfriendly to CVS, as one can't drop directories in CVS and that would be entailed in the dropping of any objects. An alternative would be: some-dbname/some-schema/TABLES/sometable-create.sql some-dbname/some-schema/TABLES/sometable-indexes.sql some-dbname/some-schema/TABLES/sometable-constraints.sql some-dbname/some-schema/TABLES/sometable-triggers.sql some-dbname/some-schema/TABLES/sometable-rules.sql some-dbname/some-schema/VIEWS/someview-create.sql some-dbname/some-schema/VIEWS/someview-rules.sql some-dbname/some-schema/FUNCTIONS/somefunction-param{codes}.sql some-dbname/some-schema/TYPES/sometype-create.sql some-dbname/some-schema/OPERATORS/someoperator-create.sql or even: some-dbname/some-schema/TABLES/sometable.sql some-dbname/some-schema/VIEWS/someview.sql some-dbname/some-schema/FUNCTIONS/somefunction-param{codes}.sql some-dbname/some-schema/TYPES/sometype.sql some-dbname/some-schema/OPERATORS/OPsomeoperator.sql In this last, all dependant objects of, for example, a table (rules, triggers, indexes, etc. ) would be rolled up into one file. It's this last version that I personally favor. -- Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-sql по дате отправления: