OIDS question

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

OIDS question

От:
Frank Bax <fbax@sympatico.ca>
Дата:
I know we shouldn't use them; but ...

We have some apps that are using OIDS only as a unique key for updating 
single records in table.

To transfer these tables to another system using pg_dump; I really only 
need "WITH OIDS" on the CREATE TABLE command, not the COPY statements.

While playing with this I noticed that using the -c -o options of 
pg_dump together; I get OIDS in COPY statements, but not in the CREATE 
commands.  Either this is a bug; or I'm missing something here...

Re: OIDS question

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Frank Bax  writes:
> While playing with this I noticed that using the -c -o options of 
> pg_dump together; I get OIDS in COPY statements, but not in the CREATE 
> commands.  Either this is a bug; or I'm missing something here...

Please provide some details ... AFAICS the COPY and CREATE TABLE cases
are testing the same conditions.

			regards, tom lane

Re: OIDS question

От:
Frank Bax <fbax@sympatico.ca>
Дата:
Tom Lane wrote:
> Frank Bax  writes:
>> While playing with this I noticed that using the -c -o options of 
>> pg_dump together; I get OIDS in COPY statements, but not in the CREATE 
>> commands.  Either this is a bug; or I'm missing something here...
> 
> Please provide some details ... AFAICS the COPY and CREATE TABLE cases
> are testing the same conditions.



Never mind; I was missing something. It seems that pg_dump puts out SET 
commands instead of using "WITH OIDS" option on "CREATE TABLE"; as in:

SET default_with_oids = true;
SET default_with_oids = false;

Sorry for the noise.
FAQ