Re: i have table

Поиск
Список
Период
Сортировка
От Aaron Bono
Тема Re: i have table
Дата
Msg-id bf05e51c0610090901p6d2562acwfff1b200c086ffa9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: i have table  (Andrew Sullivan <ajs@crankycanuck.ca>)
Ответы Re: i have table
Список pgsql-sql
On 10/5/06, Andrew Sullivan <ajs@crankycanuck.ca> wrote:
On Wed, Oct 04, 2006 at 11:20:07AM -0500, Aaron Bono wrote:
>
> So do it as needed and convert your application slowly.

You don't even need to do that.

ALTER TABLE tablename RENAME TO tablename_real;

CREATE VIEW tablename [&c.]

Now the view looks to the application just like the old table.  If
you want to insert &c., you put some rules there.


If you do this you need to make the view updateable or inserts/updates/deletes will break.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG 8.2beta reordering working for this case?
Следующее
От: "Aaron Bono"
Дата:
Сообщение: Re: [HACKERS] timestamp subtraction (was Re: formatting intervals with to_char)