Re: How to individually list the DDL for all individual data base objects

From: Berend Tober <btober(at)broadstripe(dot)net>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Berend Tober <btober(at)broadstripe(dot)net>, François Beausoleil <francois(at)teksol(dot)info>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to individually list the DDL for all individual data base objects
Date: 2014-11-24 17:25:39
Message-ID: 54736A13.8070308@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver wrote:
> On 11/24/2014 08:12 AM, Berend Tober wrote:
>> François Beausoleil wrote:
>>>
>>> Le 2014-11-24 à 10:14, Berend Tober <btober(at)broadstripe(dot)net> a écrit :
>>>
>>>> Is there a good way to individually list the DDL for all individual
>>>> data base objects?
>>>>
>>>
>>> <snip>
>>>
>>>
>>> Were you aware that pg_restore can restore to STDOUT, and output DDL
>>> for only a single named object from a custom dump file?
>>
>> <snip> <snip>
>>
>> The dependance issue is potentially a problem, but (as I believe) it
>> looks like the output of pg_restore in a list file is in the correct
>> order to process dependencies, so I could walk backwards of forwards
>> through that if changes to one object were dependent on, or caused
>> cascading effects in other objects.
>
> At this point I have to ask:
>
> What is the problem you are trying to solve?
>
> Your last paragraph seems to be reinventing the -Fc TOC, so I am not
> sure where you going with this?

On the small scale, I wanted to have an individual file listing the DDL
for each data base object in the case that I need to modify the object
... I could start with the script that created it as a basis for
modifications, like for views and functions, etc. In the larger scale, I
was thinking I would like to check in all of the individual modules to
revision control, retaining a fine-grained control, rather than
submitting the one big comprehensive file.

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Berend Tober 2014-11-24 17:33:31 Re: How to individually list the DDL for all individual data base objects
Previous Message Adrian Klaver 2014-11-24 16:20:22 Re: How to individually list the DDL for all individual data base objects