postgres - oid question

Started by brucealmost 19 years ago5 messagesgeneral
Jump to latest
#1bruce
bedouglas@earthlink.net

Hi...

In looking over a few sites via google, I'm trying to figure out what has to
be added to the sql I have for creating TBLs that use OIDs. I'd rather have
the cmds added to the sql file, than the postgres conf file...

I can't find out what I have to add!

I understand that OIDs are depricated, but the app I'm dealing with has
them. I'm using v8.1 of postgres on Fedora 5.

Any pointers are appreciated.

thanks

-bruce
bedouglas@earthlink.net

#2Oliver Elphick
olly@lfix.co.uk
In reply to: bruce (#1)
Re: postgres - oid question

On Thu, 2007-05-24 at 10:58 -0700, bruce wrote:

Hi...

In looking over a few sites via google, I'm trying to figure out what has to
be added to the sql I have for creating TBLs that use OIDs. I'd rather have
the cmds added to the sql file, than the postgres conf file...

I can't find out what I have to add!

I understand that OIDs are depricated, but the app I'm dealing with has
them. I'm using v8.1 of postgres on Fedora 5.

Any pointers are appreciated.

TO create one table with oids, use
CREATE TABLE table_name (...) WITH OIDS;

To have all tables created with oids, set the config parameter
default_with_oids to true. (It defaults to false from 8.1 onwards.)

Oliver Elphick

#3bruce
bedouglas@earthlink.net
In reply to: Oliver Elphick (#2)
Re: postgres - oid question

Hi Oliver.

Thanks for the reply.

I was hoping that there was/is a single cmd that I could use at the
beginning of the sql file, that would allow all the tables that are created
to be created using the OID. Kind of a

use OID
create tbl Foo1
create tbl Foo2
create tbl Foo3
create tbl Foo4
create tbl Foo5
stop OID
create tbl Foo6
create tbl Foo7

so that everything created between use/stop would be created using OID...

thanks

-bruce

-----Original Message-----
From: Oliver Elphick [mailto:olly@lfix.co.uk]
Sent: Thursday, May 24, 2007 11:19 AM
To: bedouglas@earthlink.net
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres - oid question

On Thu, 2007-05-24 at 10:58 -0700, bruce wrote:

Hi...

In looking over a few sites via google, I'm trying to figure out what has

to

be added to the sql I have for creating TBLs that use OIDs. I'd rather

have

the cmds added to the sql file, than the postgres conf file...

I can't find out what I have to add!

I understand that OIDs are depricated, but the app I'm dealing with has
them. I'm using v8.1 of postgres on Fedora 5.

Any pointers are appreciated.

TO create one table with oids, use
CREATE TABLE table_name (...) WITH OIDS;

To have all tables created with oids, set the config parameter
default_with_oids to true. (It defaults to false from 8.1 onwards.)

Oliver Elphick

#4Alan Hodgson
ahodgson@simkin.ca
In reply to: bruce (#3)
Re: postgres - oid question

On Thursday 24 May 2007 11:31, "bruce" <bedouglas@earthlink.net> wrote:

Hi Oliver.

Thanks for the reply.

I was hoping that there was/is a single cmd that I could use at the
beginning of the sql file, that would allow all the tables that are
created to be created using the OID. Kind of a

set default_with_oids = true;
create table ...
create table ...

--
`"Gun-wielding recluse gunned down by local police" isn't the epitaph
I want. I am hoping for "Witnesses reported the sound up to two hundred
kilometers away" or "Last body part finally located".' --- James Nicoll

In reply to: bruce (#1)
Re: postgres - oid question

On 24/05/2007 18:58, bruce wrote:

In looking over a few sites via google, I'm trying to figure out what has to
be added to the sql I have for creating TBLs that use OIDs. I'd rather have

Something like -

create table (...) with oids;

- but check the docs (under CREATE TABLE) to be sure.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------