Re: Why is specifying oids = false multiple times in create table is silently ignored? - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: Why is specifying oids = false multiple times in create table is silently ignored?
Date
Msg-id be1c1476-c457-47b1-8183-dfba857675f7@www.fastmail.com
Whole thread Raw
In response to Re: Why is specifying oids = false multiple times in create table is silently ignored?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Why is specifying oids = false multiple times in create table is silently ignored?  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, Apr 7, 2021, at 10:25 AM, Bharath Rupireddy wrote:
On Wed, Apr 7, 2021 at 4:20 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Apr 07, 2021 at 04:00:46PM +0530, Bharath Rupireddy wrote:
> > And also, the commit 578b229718 talks about removing "with (oids =
> > false)" someday. Is it the time now to remove that and error out with
> > "unrecognized parameter "oids""?
>
> Nope, and I think that it will remain around for some time.  Keeping
> around the code necessary to silence WITH OIDS has no real maintenance
> cost, and removing it could easily break applications.  So there is
> little gain in cleaning up that, and a lot of potential loss for
> users.

I agree to not remove "with (oids = false)". At least shouldn't we fix
the "create table ... with (oids = false, oids = false ....)" case,
just to be consistent with other options?
It would be weird to error out while parsing a no-op option, no?

> But, why do we need to allow specifying oids = false multiple times(see
> below)? Shouldn't we throw an error for consistency with other options?
>
If you look at transformReloptions(), the no-op code is just a hack. Such a
patch should add 'oids' as a reloption to test for multiple occurrences.
Although, CREATE TABLE says you can use 'oids=false', Storage Parameters
section does not mention it as a parameter. The code is fine as is.


--
Euler Taveira

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Wired if-statement in gen_partprune_steps_internal
Next
From: Hellmuth Vargas
Date:
Subject: Re: PostgreSQL log query's result size