Re: introduce "default_use_oids"

Lists: pgsql-patches
From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: introduce "default_use_oids"
Date: 2003-10-01 00:00:22
Message-ID: 1064966422.22912.34.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

This patch adds a new GUC var, "default_use_oids", which follows the
proposal for eventually deprecating OIDs on user tables that I posted
earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
WITHOUT OIDS when dumping a table. The documentation has been updated.

Comments are welcome.

(This patch is for the 7.5 queue.)

-Neil

Attachment Content-Type Size
use_oids_guc_var-7.patch text/x-patch 15.6 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-10-09 19:07:10
Message-ID: 200310091907.h99J7AK17956@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This, and the email thead, were added to the queue for 7.5:

http:/momjian.postgresql.org/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Neil Conway wrote:
> This patch adds a new GUC var, "default_use_oids", which follows the
> proposal for eventually deprecating OIDs on user tables that I posted
> earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> WITHOUT OIDS when dumping a table. The documentation has been updated.
>
> Comments are welcome.
>
> (This patch is for the 7.5 queue.)
>
> -Neil
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

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


From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-10-10 09:56:26
Message-ID: 2ipcovssdds1fdquaila26sumu13k1tt60@email.aon.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
wrote:
>This patch adds a new GUC var, "default_use_oids"

Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
This checkin might contain hints to the places that have to be
modified:

2003-01-23 tgl
* src/backend/executor/execMain.c 1.199:
* src/backend/executor/execMain.c [REL7_3_STABLE] 1.180.2.1:
* src/backend/executor/execUtils.c 1.96:
* src/backend/executor/execUtils.c [REL7_3_STABLE] 1.90.2.1:
* src/include/nodes/execnodes.h 1.92:
* src/include/nodes/execnodes.h [REL7_3_STABLE] 1.75.2.1:
Change CREATE TABLE AS / SELECT INTO to create the new table with
OIDs, for backwards compatibility with pre-7.3 behavior. Per
discussion on pgsql-general and pgsql-hackers.

Servus
Manfred


From: Neil Conway <neilc(at)samurai(dot)com>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-10-17 20:50:03
Message-ID: 1066423803.580.61.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
> wrote:
> >This patch adds a new GUC var, "default_use_oids"
>
> Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?

Good catch. I've attached an updated patch. I also included a few
improvements to the docs.

I think it would be a good idea to extend CREATE TABLE AS to allow WITH
OIDS and WITHOUT OIDS to be specified, so that it provides a better
option for people who need OIDs in their CREATE TABLE AS-generated
tables than manually setting the default_use_oids GUC var (CREATE TABLE
AS should also accept ON COMMIT ..., for that matter). But implementing
this will require changing the internal representation of CREATE TABLE
AS to be something more than just a wrapper over SelectStmt, I believe.
I haven't made this change in the attached patch, but I'll probably do
it before 7.5 is released. Any comments?

-Neil

Attachment Content-Type Size
use_oids_guc_var-10.patch text/x-patch 29.8 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Manfred Koizar <mkoi-pg(at)aon(dot)at>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-10-21 02:03:56
Message-ID: 200310210203.h9L23uJ03852@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This has been saved for the 7.5 release:

http:/momjian.postgresql.org/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Neil Conway wrote:
> On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> > On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
> > wrote:
> > >This patch adds a new GUC var, "default_use_oids"
> >
> > Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
>
> Good catch. I've attached an updated patch. I also included a few
> improvements to the docs.
>
> I think it would be a good idea to extend CREATE TABLE AS to allow WITH
> OIDS and WITHOUT OIDS to be specified, so that it provides a better
> option for people who need OIDs in their CREATE TABLE AS-generated
> tables than manually setting the default_use_oids GUC var (CREATE TABLE
> AS should also accept ON COMMIT ..., for that matter). But implementing
> this will require changing the internal representation of CREATE TABLE
> AS to be something more than just a wrapper over SelectStmt, I believe.
> I haven't made this change in the attached patch, but I'll probably do
> it before 7.5 is released. Any comments?
>
> -Neil
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Manfred Koizar <mkoi-pg(at)aon(dot)at>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 04:57:22
Message-ID: 200312010457.hB14vM717423@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Neil Conway wrote:
> On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> > On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
> > wrote:
> > >This patch adds a new GUC var, "default_use_oids"
> >
> > Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
>
> Good catch. I've attached an updated patch. I also included a few
> improvements to the docs.
>
> I think it would be a good idea to extend CREATE TABLE AS to allow WITH
> OIDS and WITHOUT OIDS to be specified, so that it provides a better
> option for people who need OIDs in their CREATE TABLE AS-generated
> tables than manually setting the default_use_oids GUC var (CREATE TABLE
> AS should also accept ON COMMIT ..., for that matter). But implementing
> this will require changing the internal representation of CREATE TABLE
> AS to be something more than just a wrapper over SelectStmt, I believe.
> I haven't made this change in the attached patch, but I'll probably do
> it before 7.5 is released. Any comments?
>
> -Neil
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Manfred Koizar <mkoi-pg(at)aon(dot)at>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 06:18:23
Message-ID: Pine.LNX.4.44.0312010717570.22012-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian writes:

> Your patch has been added to the PostgreSQL unapplied patches list at:
>
> http://momjian.postgresql.org/cgi-bin/pgpatches
>
> I will try to apply it within the next 48 hours.

This parameter ought to be called "default_with_oids", to reflect the
actual effect.

>
> ---------------------------------------------------------------------------
>
>
> Neil Conway wrote:
> > On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> > > On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
> > > wrote:
> > > >This patch adds a new GUC var, "default_use_oids"
> > >
> > > Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
> >
> > Good catch. I've attached an updated patch. I also included a few
> > improvements to the docs.
> >
> > I think it would be a good idea to extend CREATE TABLE AS to allow WITH
> > OIDS and WITHOUT OIDS to be specified, so that it provides a better
> > option for people who need OIDs in their CREATE TABLE AS-generated
> > tables than manually setting the default_use_oids GUC var (CREATE TABLE
> > AS should also accept ON COMMIT ..., for that matter). But implementing
> > this will require changing the internal representation of CREATE TABLE
> > AS to be something more than just a wrapper over SelectStmt, I believe.
> > I haven't made this change in the attached patch, but I'll probably do
> > it before 7.5 is released. Any comments?
> >
> > -Neil
> >
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 8: explain analyze is your friend
>
>

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Manfred Koizar <mkoi-pg(at)aon(dot)at>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 14:12:04
Message-ID: 200312011412.hB1EC4R02668@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Agreed.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > http://momjian.postgresql.org/cgi-bin/pgpatches
> >
> > I will try to apply it within the next 48 hours.
>
> This parameter ought to be called "default_with_oids", to reflect the
> actual effect.
>
> >
> > ---------------------------------------------------------------------------
> >
> >
> > Neil Conway wrote:
> > > On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> > > > On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <neilc(at)samurai(dot)com>
> > > > wrote:
> > > > >This patch adds a new GUC var, "default_use_oids"
> > > >
> > > > Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
> > >
> > > Good catch. I've attached an updated patch. I also included a few
> > > improvements to the docs.
> > >
> > > I think it would be a good idea to extend CREATE TABLE AS to allow WITH
> > > OIDS and WITHOUT OIDS to be specified, so that it provides a better
> > > option for people who need OIDs in their CREATE TABLE AS-generated
> > > tables than manually setting the default_use_oids GUC var (CREATE TABLE
> > > AS should also accept ON COMMIT ..., for that matter). But implementing
> > > this will require changing the internal representation of CREATE TABLE
> > > AS to be something more than just a wrapper over SelectStmt, I believe.
> > > I haven't made this change in the attached patch, but I'll probably do
> > > it before 7.5 is released. Any comments?
> > >
> > > -Neil
> > >
> >
> > [ Attachment, skipping... ]
> >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 8: explain analyze is your friend
> >
> >
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 22:07:40
Message-ID: 200312012207.hB1M7ex02868@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Updated patch applied. Thanks.

---------------------------------------------------------------------------

Neil Conway wrote:
> This patch adds a new GUC var, "default_use_oids", which follows the
> proposal for eventually deprecating OIDs on user tables that I posted
> earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> WITHOUT OIDS when dumping a table. The documentation has been updated.
>
> Comments are welcome.
>
> (This patch is for the 7.5 queue.)
>
> -Neil
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

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


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 22:35:17
Message-ID: 20031201223517.GM16484@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Mon, Dec 01, 2003 at 05:07:40PM -0500, Bruce Momjian wrote:

> Neil Conway wrote:
> > This patch adds a new GUC var, "default_use_oids", which follows the
> > proposal for eventually deprecating OIDs on user tables that I posted
> > earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> > WITHOUT OIDS when dumping a table. The documentation has been updated.
> >
> > Comments are welcome.

Hum, sorry to be late, but wasn't one of the supposed strenghts of
pg_dump supposed to be that you could take a dump and load it on a
different RDBMS? I haven't tried it so I don't know if it works, but
this patch takes out the ability to do that -- no one else will accept
WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
provided to stop the emission of those modifiers?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 23:00:55
Message-ID: Pine.LNX.4.44.0312020000290.23890-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Alvaro Herrera writes:

> On Mon, Dec 01, 2003 at 05:07:40PM -0500, Bruce Momjian wrote:
>
> > Neil Conway wrote:
> > > This patch adds a new GUC var, "default_use_oids", which follows the
> > > proposal for eventually deprecating OIDs on user tables that I posted
> > > earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> > > WITHOUT OIDS when dumping a table. The documentation has been updated.
> > >
> > > Comments are welcome.
>
> Hum, sorry to be late, but wasn't one of the supposed strenghts of
> pg_dump supposed to be that you could take a dump and load it on a
> different RDBMS? I haven't tried it so I don't know if it works, but
> this patch takes out the ability to do that -- no one else will accept
> WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
> provided to stop the emission of those modifiers?

I agree with that. By default, WITH/WITHOUT OIDS should not be dumped.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 23:17:53
Message-ID: 200312012317.hB1NHri13739@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> Alvaro Herrera writes:
>
> > On Mon, Dec 01, 2003 at 05:07:40PM -0500, Bruce Momjian wrote:
> >
> > > Neil Conway wrote:
> > > > This patch adds a new GUC var, "default_use_oids", which follows the
> > > > proposal for eventually deprecating OIDs on user tables that I posted
> > > > earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> > > > WITHOUT OIDS when dumping a table. The documentation has been updated.
> > > >
> > > > Comments are welcome.
> >
> > Hum, sorry to be late, but wasn't one of the supposed strenghts of
> > pg_dump supposed to be that you could take a dump and load it on a
> > different RDBMS? I haven't tried it so I don't know if it works, but
> > this patch takes out the ability to do that -- no one else will accept
> > WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
> > provided to stop the emission of those modifiers?
>
> I agree with that. By default, WITH/WITHOUT OIDS should not be dumped.

Yes, I see that now:

CREATE TABLE x (
y integer
) WITH OIDS;

We need a solution to this. One idea is to use SET to change the
default_with_oids setting when a table changes characteristics.

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


From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-01 23:28:41
Message-ID: 87d6b82k46.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> We need a solution to this.

I'm really not sure we do: the SQL produced by pg_dump was totally
non-portable before, and it is slightly less portable now. ISTM that
you will almost always need to do some post-processing of pg_dump's
output to have any hope of loading it into another RDBMS in any case.

A flag for pg_dump that told it to produce standards-compliant SQL
would be a cool thing to have, but that would provide a solution to a
problem that has always existed, not one that is introduced by this
patch.

> One idea is to use SET to change the default_with_oids setting when
> a table changes characteristics.

It is easy to do this if people think it would improve things. I
didn't do it myself because I didn't see how it helped: SET is not in
the standard either. It is just as trivial to use sed/perl/etc. to
remove "SET default_with_oids ..." as it is to remove "WITH/WITHOUT
OIDS".

-Neil


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 06:34:58
Message-ID: Pine.LNX.4.44.0312020733470.9334-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Neil Conway writes:

> I'm really not sure we do: the SQL produced by pg_dump was totally
> non-portable before,

Significant effort has been invested to make pg_dump output portable, and
I've not had any problems with it last time I tried it. Please explain
why you think it's "totally" non-portable.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 06:49:32
Message-ID: 3FCC35FC.4070107@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

> Hum, sorry to be late, but wasn't one of the supposed strenghts of
> pg_dump supposed to be that you could take a dump and load it on a
> different RDBMS? I haven't tried it so I don't know if it works, but
> this patch takes out the ability to do that -- no one else will accept
> WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
> provided to stop the emission of those modifiers?

There are so many other incompatibilities in our dumps anyway!

Anyway, our first loyalty is to PostgreSQL...

If someone can't run a sed script to 's/WITH OIDS//g', then they're
going to have a LOT of problems...

Chris


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 06:56:37
Message-ID: 3FCC37A5.6090906@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

> Significant effort has been invested to make pg_dump output portable, and
> I've not had any problems with it last time I tried it. Please explain
> why you think it's "totally" non-portable.

Functions, indexes, operators, types, aggregates, users, groups,
databases, inheritance, clustering, col stats, col storage, ...

What IS compatible? Very basic table definitions?

Chris


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 09:30:46
Message-ID: Pine.LNX.4.44.0312021024540.9834-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Christopher Kings-Lynne writes:

> > Significant effort has been invested to make pg_dump output portable, and
> > I've not had any problems with it last time I tried it. Please explain
> > why you think it's "totally" non-portable.
>
> Functions, indexes, operators, types, aggregates, users, groups,
> databases, inheritance, clustering, col stats, col storage, ...
>
> What IS compatible? Very basic table definitions?

If I want to develop a portable application or I want to port an
application, then I am of course only going to use portable constructs,
that is, tables and views, and possibly sequences. I'm not talking theory
here -- I've actually done it and made several changes to pg_dump along
the way to make the output portable. This is an actual feature that is
being destroyed.

I'm sure there are other ways to phase out OIDs in dumps. For example, we
could set the default mode at the top (easily deleted, much safer than
running a global search and replace) and then add WITH/WITHOUT OIDS only
to those tables that deviate from the default.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Neil Conway <neilc(at)samurai(dot)com>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 12:26:39
Message-ID: 200312021226.hB2CQdN13481@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> If I want to develop a portable application or I want to port an
> application, then I am of course only going to use portable constructs,
> that is, tables and views, and possibly sequences. I'm not talking theory
> here -- I've actually done it and made several changes to pg_dump along
> the way to make the output portable. This is an actual feature that is
> being destroyed.
>
> I'm sure there are other ways to phase out OIDs in dumps. For example, we
> could set the default mode at the top (easily deleted, much safer than
> running a global search and replace) and then add WITH/WITHOUT OIDS only
> to those tables that deviate from the default.

Agreed. By using SET, you could still pipe the file through another
database --- the SETs would fail, but the CREATE TABLE commands would
work. With WITH/WITHOUT OIDS, the CREATE TABLEs would fail.

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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 12:48:49
Message-ID: 200312021248.hB2Cmnw16486@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> Neil Conway writes:
>
> > I'm really not sure we do: the SQL produced by pg_dump was totally
> > non-portable before,
>
> Significant effort has been invested to make pg_dump output portable, and
> I've not had any problems with it last time I tried it. Please explain
> why you think it's "totally" non-portable.

Also, I think we have to have a SET before every CREATE TABLE. If we
don't how does it work if we restore a single table from the dump? We
must handle this type of thing with SET SESSION AUTHORIZATION to make
sure we are the proper owner, so it seems we could do the same with
oids.

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <neilc(at)samurai(dot)com>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-02 15:09:43
Message-ID: 12597.1070377783@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Also, I think we have to have a SET before every CREATE TABLE.

No, only when the value changes from last time. This is not rocket
science, it's the way pg_dump handles SETs already.

regards, tom lane


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-03 01:46:41
Message-ID: 3FCD4081.7090507@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

> If I want to develop a portable application or I want to port an
> application, then I am of course only going to use portable constructs,
> that is, tables and views, and possibly sequences. I'm not talking theory
> here -- I've actually done it and made several changes to pg_dump along
> the way to make the output portable. This is an actual feature that is
> being destroyed.

OK.

> I'm sure there are other ways to phase out OIDs in dumps. For example, we
> could set the default mode at the top (easily deleted, much safer than
> running a global search and replace) and then add WITH/WITHOUT OIDS only
> to those tables that deviate from the default.

Ok, more thought is required then.

Chris


From: Neil Conway <neilc(at)samurai(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-03 02:31:20
Message-ID: 87llpuaayv.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I'm sure there are other ways to phase out OIDs in dumps.

Okay, fair enough -- I'll submit a patch to change this.

-Neil


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <neilc(at)samurai(dot)com>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2003-12-03 22:40:09
Message-ID: 200312032240.hB3Me9X20365@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Also, I think we have to have a SET before every CREATE TABLE.
>
> No, only when the value changes from last time. This is not rocket
> science, it's the way pg_dump handles SETs already.

Yea, that was my point of SET SESSION AUTHORIAZTION --- we already have
code to track current user and issue proper set, and somehow restoring
individual tables also works in those cases --- let's do the same with
oids.

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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2004-03-17 01:26:44
Message-ID: 200403170126.i2H1Qi511437@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


I see we still are dumping CREATE TABLE using WITH OIDS, rather than
using the more portable SET default_with_oids. This needs fixing.

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> On Mon, Dec 01, 2003 at 05:07:40PM -0500, Bruce Momjian wrote:
>
> > Neil Conway wrote:
> > > This patch adds a new GUC var, "default_use_oids", which follows the
> > > proposal for eventually deprecating OIDs on user tables that I posted
> > > earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> > > WITHOUT OIDS when dumping a table. The documentation has been updated.
> > >
> > > Comments are welcome.
>
> Hum, sorry to be late, but wasn't one of the supposed strenghts of
> pg_dump supposed to be that you could take a dump and load it on a
> different RDBMS? I haven't tried it so I don't know if it works, but
> this patch takes out the ability to do that -- no one else will accept
> WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
> provided to stop the emission of those modifiers?
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "Escucha y olvidar?s; ve y recordar?s; haz y entender?s" (Confucio)
>

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


From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2004-03-17 03:11:20
Message-ID: 87n06gqiav.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> I see we still are dumping CREATE TABLE using WITH OIDS, rather than
> using the more portable SET default_with_oids. This needs fixing.

Yes, I know. If you're eager for it, please consider implementing it
yourself.

-Neil


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2004-03-17 03:33:46
Message-ID: 200403170333.i2H3Xk429769@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Neil Conway wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I see we still are dumping CREATE TABLE using WITH OIDS, rather than
> > using the more portable SET default_with_oids. This needs fixing.
>
> Yes, I know. If you're eager for it, please consider implementing it
> yourself.

Or I will consider removing the feature because we never agreed to the
current behavior.

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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: introduce "default_use_oids"
Date: 2004-03-24 18:18:26
Message-ID: 200403241818.i2OIIQB04069@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Alvaro Herrera wrote:
> On Mon, Dec 01, 2003 at 05:07:40PM -0500, Bruce Momjian wrote:
>
> > Neil Conway wrote:
> > > This patch adds a new GUC var, "default_use_oids", which follows the
> > > proposal for eventually deprecating OIDs on user tables that I posted
> > > earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
> > > WITHOUT OIDS when dumping a table. The documentation has been updated.
> > >
> > > Comments are welcome.
>
> Hum, sorry to be late, but wasn't one of the supposed strenghts of
> pg_dump supposed to be that you could take a dump and load it on a
> different RDBMS? I haven't tried it so I don't know if it works, but
> this patch takes out the ability to do that -- no one else will accept
> WITH/WITHOUT OIDS, so the dump will have to be modified. Is a switch
> provided to stop the emission of those modifiers?

Fixed with my patch from yesterday.

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