Re: [SQL] hi all......................!!

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: [SQL] hi all......................!!
Дата
Msg-id 43D7447C.1000907@logix-tt.com
обсуждение исходный текст
Ответ на hi all......................!!  (AKHILESH GUPTA <akhilesh.davim@gmail.com>)
Список pgsql-general
Hi, Akilesh,

AKHILESH GUPTA wrote:

> i am new to this mailing list. this is my first mail to this group.
> i jussst want to confirm that whether is it possible to update a view or
> not??
> i think you all help me in solving my queries in future...................!!

Do you think about issuing UPDATE commands on a view, or do you think
about updating the view definition itsself?

The former is possible if you add the appropriate 'ON UPDATE DO INSTEAD'
Rules to the view, see
http://www.postgresql.org/docs/8.1/static/rules.html and
http://www.postgresql.org/docs/8.1/static/sql-createrule.html


The latter is easily possible if the updated view definition has equal
column definitions, just use "CREATE OR UPDATE VIEW ..." instead of
"CREATE VIEW ..." to update the view.

If your column definitions change, then you'll have to DROP the view
before reCREATEing it, maybe it's best to encapsulate this inside a
transaction or use a scheduled downtime.


Btw, it seems that your '.'-key is broken and chatters. :-)


HTH,

Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: [SQL] hi all......................!!
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Constraint that compares and limits field values