From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property? |
Date: | 2015-04-26 02:00:45 |
Message-ID: | 20150426020045.GF17791@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Apr 25, 2015 at 06:15:25PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > No, I just misread your email. I thought you said you had attached
> > the patch; rereading it, I see that you said you had applied the
> > patch. Silly me.
>
> The real problem with this patch is it's wrong. Specifically, it broke
> the other case I mentioned in my original email:
>
> regression=# create table src2 (f1 int, primary key(oid)) with oids;
> ERROR: column "oid" named in key does not exist
> LINE 1: create table src2 (f1 int, primary key(oid)) with oids;
> ^
Wow, thanks for seeing that mistake. I had things just fine, but then I
decided to optimize it and forgot that this code is used in non-LIKE
situations. Reverted.
> That works in 9.4, and was still working in HEAD as of my original email.
> I think the patch's logic for attaching made-up OIDS options is actually
> backwards (it's adding TRUE where it should add FALSE and vice versa),
> but in any case I do not like the dependence on default_with_oids that
> was introduced by the patch. I am not sure there's any guarantee that
> default_with_oids can't change between parsing and execution of a CREATE
> TABLE command.
I have changed the default value back to the function call as it should
have been all along; patch attached. I will revisit this for 9.6
unless I hear otherwise.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachment | Content-Type | Size |
---|---|---|
like.diff | text/x-diff | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-04-26 02:16:12 | Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property? |
Previous Message | Andrew Dunstan | 2015-04-26 01:29:03 | Re: forward vs backward slashes in msvc build code |