From: Markus Schaber <schabi@logix-tt.com>
To: AKHILESH GUPTA <akhilesh.davim@gmail.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [SQL] hi all......................!!
Date: Wed, 25 Jan 2006 10:27:24 +0100
Message-ID: <43D7447C.1000907@logix-tt.com> (raw)
In-Reply-To: <ad39daf90601242227m304fba4bwce8eff75f88609d1@mail.gmail.com>
References: <ad39daf90601242227m304fba4bwce8eff75f88609d1@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: schabi@logix-tt.com, akhilesh.davim@gmail.com, pgsql-general@postgresql.org
Subject: Re: [SQL] hi all......................!!
In-Reply-To: <43D7447C.1000907@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox