Обсуждение: Removing OIDs without recreate

Поиск
Список
Период
Сортировка

Removing OIDs without recreate

От
Együd Csaba
Дата:
Hi,
I'm winder if I can change the clause 'WITH OIDS' to 'WITHOUT OIDS' on a
table without recreating it (eg. usong ALTER TABLE). The problem is that my
tables are very big, and I do not need the OIDs at all. It was a mistake to
create them with OIDs.
Is there any way to correct it. Does it make any sense? Can it run out of
OIDs during time?

many thanks,
-- Csaba Együd


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.



Re: Removing OIDs without recreate

От
Karel Zak
Дата:
On Fri, May 07, 2004 at 10:15:46AM +0200, Együd Csaba wrote:
> Hi,
> I'm winder if I can change the clause 'WITH OIDS' to 'WITHOUT OIDS' on a
> table without recreating it (eg. usong ALTER TABLE). The problem is that my
> tables are very big, and I do not need the OIDs at all. It was a mistake to
> create them with OIDs.
> Is there any way to correct it. Does it make any sense? Can it run out of
> OIDs during time?

 ALTER TABLE ...  SET WITHOUT OIDS;

 http://www.postgresql.org/docs/7.4/static/sql-altertable.html

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

Re: Removing OIDs without recreate

От
Együd Csaba
Дата:
Using 'ALTER TABLE tablename SET WITHOUT OIDS;' command it
rises an error saying
'ERROR:  parser: parse error at or near "set" at character 23'
What is wrong with it?

-- Csaba

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.



Re: Removing OIDs without recreate

От
Karel Zak
Дата:
On Fri, May 07, 2004 at 01:13:52PM +0200, Együd Csaba wrote:
> Using 'ALTER TABLE tablename SET WITHOUT OIDS;' command it
> rises an error saying
> 'ERROR:  parser: parse error at or near "set" at character 23'
> What is wrong with it?

 Which PostgreSQL version do you have?

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

Re: Removing OIDs without recreate

От
Együd Csaba
Дата:
cygwin/7.3.4
The doc contains the option but doesn't work - at least for me.

--Csaba

> -----Original Message-----
> From: Karel Zak [mailto:zakkr@zf.jcu.cz]
> Sent: 2004. május 7. 13:48
> To: Együd Csaba
> Cc: 'Pgsql-General@Postgresql.Org (E-mail)'
> Subject: Re: [GENERAL] Removing OIDs without recreate
>
>
> On Fri, May 07, 2004 at 01:13:52PM +0200, Együd Csaba wrote:
> > Using 'ALTER TABLE tablename SET WITHOUT OIDS;' command it
> > rises an error saying
> > 'ERROR:  parser: parse error at or near "set" at character 23'
> > What is wrong with it?
>
>  Which PostgreSQL version do you have?
>
>     Karel
>
> --
>  Karel Zak  <zakkr@zf.jcu.cz>
>  http://home.zf.jcu.cz/~zakkr/
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.



Re: Removing OIDs without recreate

От
'Karel Zak'
Дата:
On Fri, May 07, 2004 at 01:59:39PM +0200, Együd Csaba wrote:
> cygwin/7.3.4
> The doc contains the option but doesn't work - at least for me.

 http://www.postgresql.org/docs/7.3/static/sql-altertable.html

 The ALTER TABLE ... SET WITHOUT OIDS is in new in 7.4

 Release 7.4 notes:

    ALTER TABLE ... WITHOUT OIDS (Rod)

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

Re: Removing OIDs without recreate

От
Együd Csaba
Дата:
Sorry I made a mistake, I saw docs for 7.4, because I use an other server
running that version.
So this won't work on 7.3.*.
Can I drop OID column painlessly? Does it lead to any problems?

Thank you,
-- Csaba

> -----Original Message-----
> From: 'Karel Zak' [mailto:zakkr@zf.jcu.cz]
> Sent: 2004. május 7. 14:06
> To: Együd Csaba
> Cc: 'Pgsql-General@Postgresql.Org (E-mail)'
> Subject: Re: [GENERAL] Removing OIDs without recreate
>
>
> On Fri, May 07, 2004 at 01:59:39PM +0200, Együd Csaba wrote:
> > cygwin/7.3.4
> > The doc contains the option but doesn't work - at least for me.
>
>  http://www.postgresql.org/docs/7.3/static/sql-altertable.html
>
>  The ALTER TABLE ... SET WITHOUT OIDS is in new in 7.4
>
>  Release 7.4 notes:
>
>     ALTER TABLE ... WITHOUT OIDS (Rod)
>
> --
>  Karel Zak  <zakkr@zf.jcu.cz>
>  http://home.zf.jcu.cz/~zakkr/
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 2004. 05. 04.