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

From Bharath Rupireddy
Subject Why is specifying oids = false multiple times in create table is silently ignored?
Date
Msg-id CALj2ACVOD3WiinPwaV4iN=3vmbchEboYUbNux5LtQq1Qd3uoHA@mail.gmail.com
Whole thread Raw
Responses Re: Why is specifying oids = false multiple times in create table is silently ignored?
List pgsql-hackers
Hi,

We generally throw an error when create table options are specified
more than once, see below:
postgres=# create table t1(a1 int) with (fillfactor = 10, fillfactor = 15);
ERROR:  parameter "fillfactor" specified more than once

Although "with oids" support is removed by the commit 578b229718 and
we do still support with (oids = false) as a no-op which may be for
backward compatibility. 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?
postgres=# create table t1(a1 int) with (oids = false, oids = false,
oids = false);
CREATE TABLE

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""?
            /*
             * This is not a great place for this test, but there's no other
             * convenient place to filter the option out. As WITH (oids =
             * false) will be removed someday, this seems like an acceptable
             * amount of ugly.
             */
postgres=# create table t1(a1 int) with (oids = 10);
ERROR:  unrecognized parameter "oids"

Thoughts?

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: CREATE SEQUENCE with RESTART option
Next
From: Michael Banck
Date:
Subject: Re: New predefined roles- 'pg_read/write_all_data'