Skip site navigation (1) Skip section navigation (2)

Re: pgsql8.1: About COPY Command and system clomn oid

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pgsql8.1: About COPY Command and system clomn oid
Date: 2005-12-10 19:12:57
Message-ID: dnf99u$1per$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
"wangshj" <wangshj(at)sduept(dot)com> wrote
>
> oidtest=# COPY oidtest (name) WITH OIDS FROM stdin;
> Enter data to be copied followed by a newline.
> End with a backslash and a period on a line by itself.
>>> 54513        copyname
>>> \.
> oidtest=# INSERT INTO oidtest ( name ) VALUES( 'name2' ) ;
> INSERT 54513 1
> oidtest=# SELECT oid,name from oidtest ;
>  oid  |   name
> -------+----------
> 54512 | name1
> 54513 | copyname
> 54513 | name2
> (3 rows)
>
> oidtest=#
> Then I got two records with same oid(54513).
>

This is not a bug. You can specify any valid number here as Oids. If you 
don't want duplicated Oids or strange Oids, then don't specify WITH OIDS 
clause.

Regards,
Qingqing 



In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-10 19:25:17
Subject: Re: BUG #2106: EXPLAIN ANALYZE with SELECT query causes a single backend server process to segfault
Previous:From: Tom LaneDate: 2005-12-10 18:46:57
Subject: Re: BUG #2106: EXPLAIN ANALYZE with SELECT query causes a single backend server process to segfault

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group