Re: regarding oid(object id)

From: Chetan Suttraway <chetan(dot)suttraway(at)enterprisedb(dot)com>
To: siva kiran balijepalli <b(dot)sivakiran(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: regarding oid(object id)
Date: 2011-03-10 09:47:29
Message-ID: AANLkTikcQHvibXy80fKDUcZ5TT72SrMtyYRr6qYgM2_s@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Mar 10, 2011 at 12:31 PM, siva kiran balijepalli <
b(dot)sivakiran(at)gmail(dot)com> wrote:

> Hi
> i am novice postgr sql user.
>
> I have created a table named customer in my data base.
> also i have inserter some of the rows into my table.
> when i try to execute this command to select object id's (oid) i am getting
> following error.
>
> select oid from customer;
> error: column oid doesn't exist
>
> note: even though i have changed the
> default_with_oids = on in postgreconf file,i am not getting the oid's.
>
> my postgre sql version is 8.4
>
> but when i try to select oid's for already existed tables in pg_catalogue
> the output is coming
> for eg: select oid from pg_proc;
>
> please reply
>
> thanks & regards
> sivakiran.B
>

let me share this simple test case:
pg=# create table myt(a int)with oids;
CREATE TABLE
pg=# select * from myt;
a
---
(0 rows)

pg=# insert into myt values(1);
INSERT 16387 1

pg=# select a, oid from myt;
a | oid
---+-------
1 | 16387
(1 row)

Please read this section:
http://www.postgresql.org/docs/9.0/static/sql-createtable.html
http://www.postgresql.org/docs/9.0/static/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS

--
Chetan Sutrave
Senior Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91.20.30589523

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are not
the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Vibhor Kumar 2011-03-10 09:57:34 Re: regarding oid(object id)
Previous Message Chetan Suttraway 2011-03-10 09:42:25 Re: difference between functions and stored procedure