From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property? |
Date: | 2015-01-15 00:39:27 |
Message-ID: | 54B70C3F.4020102@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/14/2015 07:29 PM, Tom Lane wrote:
> dst1 doesn't get an OID column:
>
> regression=# create table src1 (f1 int) with oids;
> CREATE TABLE
> regression=# create table dst1 (like src1);
> CREATE TABLE
> regression=# \d+ src1
> Table "public.src1"
> Column | Type | Modifiers | Storage | Stats target | Description
> --------+---------+-----------+---------+--------------+-------------
> f1 | integer | | plain | |
> Has OIDs: yes
>
> regression=# \d+ dst1
> Table "public.dst1"
> Column | Type | Modifiers | Storage | Stats target | Description
> --------+---------+-----------+---------+--------------+-------------
> f1 | integer | | plain | |
>
>
> If you don't find that problematic, how about this case?
>
> regression=# create table src2 (f1 int, primary key(oid)) with oids;
> CREATE TABLE
> regression=# create table dst2 (like src2 including indexes);
> ERROR: column "oid" named in key does not exist
>
>
I agree it's odd, and probably wrong, although it's been like that for a
very long time, hasn't it?
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-01-15 00:49:29 | Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property? |
Previous Message | Merlin Moncure | 2015-01-15 00:36:39 | Re: hung backends stuck in spinlock heavy endless loop |