Thread: 7.3 Beta Schema and pg_dump

7.3 Beta Schema and pg_dump

From
"Jim Buttafuoco"
Date:
I have been playing with schema's under 7.3beta and now I am trying to use pg_dump.  Is there a way to just dump 1 of
my
schema out?  


Should pg_dump -t "A.*" ...  dump out just schema A's objects?


Thanks
Jim



Re: 7.3 Beta Schema and pg_dump

From
Tom Lane
Date:
"Jim Buttafuoco" <jim@contactbda.com> writes:
> I have been playing with schema's under 7.3beta and now I am trying to
> use pg_dump.  Is there a way to just dump 1 of my schema out?

Nope; I intended to make that happen, but didn't get around to it.
        regards, tom lane


Re: 7.3 Beta Schema and pg_dump

From
"Jim Buttafuoco"
Date:
This seems like a "must" have option for pg_dump,  looking at the code, it seems that only a couple of queries would
need to be changed and a command line option (-N, --namespace=) would need to be added.

If I was to create a patch would it make it into 7.3?

Thanks
Jim



> "Jim Buttafuoco" <jim@contactbda.com> writes:
> > I have been playing with schema's under 7.3beta and now I am trying to
> > use pg_dump.  Is there a way to just dump 1 of my schema out?
> 
> Nope; I intended to make that happen, but didn't get around to it.
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org






Re: 7.3 Beta Schema and pg_dump

From
Tom Lane
Date:
"Jim Buttafuoco" <jim@contactbda.com> writes:
> This seems like a "must" have option for pg_dump,
> If I was to create a patch would it make it into 7.3?

I dunno ... I'd like to have it too, but it would break our "no new
features during beta" rule.  Comments anyone?
        regards, tom lane


Re: 7.3 Beta Schema and pg_dump

From
Oleg Bartunov
Date:
On Mon, 16 Sep 2002, Tom Lane wrote:

> "Jim Buttafuoco" <jim@contactbda.com> writes:
> > This seems like a "must" have option for pg_dump,
> > If I was to create a patch would it make it into 7.3?
>
> I dunno ... I'd like to have it too, but it would break our "no new
> features during beta" rule.  Comments anyone?
>

I'd love to have this feature. What's about contrib/ ?

>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
Regards,    Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



Re: 7.3 Beta Schema and pg_dump

From
Peter Eisentraut
Date:
Tom Lane writes:

> "Jim Buttafuoco" <jim@contactbda.com> writes:
> > This seems like a "must" have option for pg_dump,
> > If I was to create a patch would it make it into 7.3?
>
> I dunno ... I'd like to have it too, but it would break our "no new
> features during beta" rule.  Comments anyone?

I do not believe Jim's premise that it would only take a couple of changes
to a couple of queries.  Clearly, it would take at least some change to
any query that reads information about schema-aware objects.  And it needs
to be made backward compatible.  And what about cross-schema dependencies?

-- 
Peter Eisentraut   peter_e@gmx.net



Re: 7.3 Beta Schema and pg_dump

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> "Jim Buttafuoco" <jim@contactbda.com> writes:
> This seems like a "must" have option for pg_dump,
> If I was to create a patch would it make it into 7.3?
>> 
>> I dunno ... I'd like to have it too, but it would break our "no new
>> features during beta" rule.  Comments anyone?

> I do not believe Jim's premise that it would only take a couple of changes
> to a couple of queries.  Clearly, it would take at least some change to
> any query that reads information about schema-aware objects.

Actually, my vision of this was not to change any queries at all, but
just to modify the pg_dump code to include a "select this schema" option.
The infrastructure is already there in pg_dump to mark individual schemas
as to be dumped or not --- we only need a command-line option that can
mark them.

> And what about cross-schema dependencies?

Given the lack of any dependency tracing in pg_dump at the moment, I
think we just leave that on the user's head for now.  It's not any worse
than the behavior of -t, which is perfectly capable of giving you an
incomplete dump.
        regards, tom lane


Re: 7.3 Beta Schema and pg_dump

From
"Christopher Kings-Lynne"
Date:
> "Jim Buttafuoco" <jim@contactbda.com> writes:
> > This seems like a "must" have option for pg_dump,
> > If I was to create a patch would it make it into 7.3?
> 
> I dunno ... I'd like to have it too, but it would break our "no new
> features during beta" rule.  Comments anyone?

I don't see a huge reason to stick to that rule in this instance...

Chris



Re: 7.3 Beta Schema and pg_dump

From
Bruce Momjian
Date:
Christopher Kings-Lynne wrote:
> > "Jim Buttafuoco" <jim@contactbda.com> writes:
> > > This seems like a "must" have option for pg_dump,
> > > If I was to create a patch would it make it into 7.3?
> > 
> > I dunno ... I'd like to have it too, but it would break our "no new
> > features during beta" rule.  Comments anyone?
> 
> I don't see a huge reason to stick to that rule in this instance...

Reclassify it as a bug ... problem solved.  ;-)

Actually, it is sort of a bug because it is something we should have
added for schemas but forgot.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073