Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-26 Thread Dimitri Fontaine
Dmitriy Igrishin writes: > Without some "restoreddl" which able to "compile" the set of > database objects from many files this tool (getddl) does nothing > because another developer can change the database directly Indeed, getddl does not try to solve that issue. It's more a VCS and editor frien

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-26 Thread Dmitriy Igrishin
Hey Dimitri, hackers, Okay, there is a some getddl utility. But as for me, it does not simplify the development. It is "file-based pgAdmin" with the exception that I can use, e.g. Emacs for editing rather than build-in editor of pgAdmin. But I can use Emacs from psql(1)... Without some "restoredd

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-25 Thread Dimitri Fontaine
Robert Haas writes: > One thing I've often wished for is the ability to dump a specific > function See getddl from OmniTI, or the alternative version I kept forgetting to put online somewhere: https://labs.omniti.com/labs/pgtreats/wiki/getddl https://github.com/dimitri/getddl The OmniTI ver

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 24, 2010 at 10:45 AM, Tom Lane wrote: >> It *will* be manifestly harder to use if users have to spell the >> argument types just so.  Consider int4 versus integer, varchar versus >> character varying (and not character varying(N)), etc etc.  I think >> that leavi

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Robert Haas
On Wed, Nov 24, 2010 at 10:45 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Nov 24, 2010 at 9:52 AM, Tom Lane wrote: >>> Actually, what occurs to me to wonder is whether the facility has to be >>> guaranteed unique at all.  If for instance you have a group of overloaded >>> functions, is

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Tom Lane
Joachim Wieland writes: > Whatever approach we use, we need to think about the use case where 1% > of the objects should be dumped but should also make sure that you can > more or less easily dump 99% of the objects. Roberts use case is the > 1% use case. Especially for the 99% case however, pg_du

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 24, 2010 at 9:52 AM, Tom Lane wrote: >> Actually, what occurs to me to wonder is whether the facility has to be >> guaranteed unique at all.  If for instance you have a group of overloaded >> functions, is there really a big use-case for dumping just one and not

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Tom Lane
Dmitriy Igrishin writes: > I also want to propose to make it possible dump function definitions > as CREATE OR REPLACE FUNCTION rather than just CREATE > FUNCTION (as pg_dump dumps them now). It's intentional that pg_dump doesn't do that. Please don't think that pg_dump is a substitute for \ef.

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Joachim Wieland
On Wed, Nov 24, 2010 at 9:38 AM, Andrew Dunstan wrote: > It would be unique, but a pain in the neck for users to get. Robert's idea > will have more traction with users. Whatever approach we use, we need to think about the use case where 1% of the objects should be dumped but should also make sur

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Robert Haas
On Wed, Nov 24, 2010 at 9:52 AM, Tom Lane wrote: > Actually, what occurs to me to wonder is whether the facility has to be > guaranteed unique at all.  If for instance you have a group of overloaded > functions, is there really a big use-case for dumping just one and not > the whole group?  Even i

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Tom Lane
Joachim Wieland writes: > On Wed, Nov 24, 2010 at 1:15 AM, Tom Lane wrote: >> Nope ... those strings are just helpful comments, they aren't really >> guaranteed to be unique identifiers.  In any case, it seems unlikely >> that a user could expect to get the more complicated cases exactly right >>

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Andrew Dunstan
On 11/24/2010 09:05 AM, Joachim Wieland wrote: On Wed, Nov 24, 2010 at 1:15 AM, Tom Lane wrote: Nope ... those strings are just helpful comments, they aren't really guaranteed to be unique identifiers. In any case, it seems unlikely that a user could expect to get the more complicated cases

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Joachim Wieland
On Wed, Nov 24, 2010 at 1:15 AM, Tom Lane wrote: > Nope ... those strings are just helpful comments, they aren't really > guaranteed to be unique identifiers.  In any case, it seems unlikely > that a user could expect to get the more complicated cases exactly right > other than by consulting "pg_d

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Robert Haas
On Wed, Nov 24, 2010 at 8:41 AM, Andrew Dunstan wrote: > On 11/24/2010 07:29 AM, Robert Haas wrote: >>  As a first attempt at syntax, I might suggest something along the >> lines of "object type: object name", where the types and names might >> look to COMMENT ON for inspiration. > > pg_dump alrea

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Andrew Dunstan
On 11/24/2010 07:29 AM, Robert Haas wrote: As a first attempt at syntax, I might suggest something along the lines of "object type: object name", where the types and names might look to COMMENT ON for inspiration. pg_dump already uses a list of object types (e.g. as seen in the output fro

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Dmitriy Igrishin
Hey hackers, Completely agree with Robert ! It would be nice to dump functions definitions, e.g. to make it possible keep them in git separately. I also want to propose to make it possible dump function definitions as CREATE OR REPLACE FUNCTION rather than just CREATE FUNCTION (as pg_dump dumps th

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-24 Thread Robert Haas
On Wed, Nov 24, 2010 at 1:15 AM, Tom Lane wrote: > Josh Berkus writes: >>> Well, very little about pg_dump is very [E], IMNSHO. The question in my >>> mind here is what format the list file will take > >> I was thinking same format as pg_restore -l, only without the dumpIDs. > > Nope ... those st

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-23 Thread Tom Lane
Josh Berkus writes: >> Well, very little about pg_dump is very [E], IMNSHO. The question in my >> mind here is what format the list file will take > I was thinking same format as pg_restore -l, only without the dumpIDs. Nope ... those strings are just helpful comments, they aren't really guarant

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-23 Thread Josh Berkus
. > Well, very little about pg_dump is very [E], IMNSHO. The question in my > mind here is what format the list file will take I was thinking same format as pg_restore -l, only without the dumpIDs. -- -- Josh Berkus PostgreS

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-23 Thread Joachim Wieland
On Tue, Nov 23, 2010 at 10:24 PM, Andrew Dunstan wrote: > Well, very little about pg_dump is very [E], IMNSHO. The question in my mind > here is what format the list file will take. For example, how would we > specify a function? Would we need to specify all the argument types (or at > least the I

Re: [HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-23 Thread Andrew Dunstan
On 11/23/2010 09:33 PM, Josh Berkus wrote: Hackers, I just thought of a good feature to put on the [E] list for TODO, if people agree: a switch to pg_dump called "--from-list" which would take a filename and dump the list of objects in that file. Objections to putting this on the TODO? Well

[HACKERS] Suggested "easy" TODO: pg_dump --from-list

2010-11-23 Thread Josh Berkus
Hackers, I just thought of a good feature to put on the [E] list for TODO, if people agree: a switch to pg_dump called "--from-list" which would take a filename and dump the list of objects in that file. Objections to putting this on the TODO? -- -- Josh Berkus