Re: add "WITH OIDS" to CREATE TABLE AS

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: add "WITH OIDS" to CREATE TABLE AS
Дата
Msg-id 87r7ycoesq.fsf@mailbox.samurai.com
обсуждение исходный текст
Ответ на Re: add "WITH OIDS" to CREATE TABLE AS  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: add "WITH OIDS" to CREATE TABLE AS  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Couldn't we use SET only when we need to change the existing value?

I'm not sure what you mean. The pg_dump output will look like:

-- at the top of the dump
SET default_with_oids = false; -- or true, doesn't really matter

-- for a table that doesn't have OIDs
CREATE TABLE (...);

-- for a table that does have OIDs
SET default_with_oids = true;
CREATE TABLE (...);
SET default_with_oids = false;

The point is that in this example if all the tables in the DB have
OIDs, you'll emit two SETs for each CREATE TABLE, so what you'd really
like is to have chosen a different default to begin with.

Anyway, it's just an implementation detail: I'll definitely implement
it one way or another in time for 7.5 (unless someone else would like
to do it, in which case I'd gladly step aside).

-Neil


В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: add "WITH OIDS" to CREATE TABLE AS
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: fork/exec patch: pre-CreateProcess finalization