Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident
Дата
Msg-id 20150312163342.GC3291@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
Andrew Gierth wrote:
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

>  Tom> Yeah, possibly.  The existing pg_dump coding dates from before we
>  Tom> had CREATE OR REPLACE VIEW.
> 
> As it happens it does not; the issue came up originally because of a
> hack I came up with, and I've never used any pg version so old it didn't
> have CREATE OR REPLACE VIEW. Nor does it look like the change was ever
> backpatched (or at least not that far).
> 
> http://www.postgresql.org/message-id/20986.1102296367@sss.pgh.pa.us

Wow --- We've had CREATE OR REPLACE VIEW since 2002:

commit 248c67d7ed505d98d3a94cd3954835255317ff16
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Mon Sep 2 02:13:02 2002 +0000
   CREATE OR REPLACE VIEW, CREATE OR REPLACE RULE.   Gavin Sherry, Neil Conway, and Tom Lane all got their hands dirty
on this one ...
 


What is newer is the ability to add columns:

commit ff1ea2173a92dea975d399a4ca25723f83762e55
Author: Bruce Momjian <bruce@momjian.us>
Date:   Sat Dec 6 23:22:46 2008 +0000
   Allow CREATE OR REPLACE VIEW to add columns to the _end_ of the view.      Robert Haas

(Andrew's original post is from 2004)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Parallel Seq Scan
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident