pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
hi all......................!!
4+ messages / 4 participants
[nested] [flat]

* hi all......................!!
@ 2006-01-25 06:27 AKHILESH GUPTA <akhilesh.davim@gmail.com>
  2006-01-25 06:50 ` Re: hi all......................!! Tino Wildenhain <tino@wildenhain.de>
  2006-01-25 09:24 ` Re: [SQL] hi all......................!! Richard Huxton <dev@archonet.com>
  2006-01-25 09:27 ` Re: [SQL] hi all......................!! Markus Schaber <schabi@logix-tt.com>
  0 siblings, 3 replies; 4+ messages in thread

From: AKHILESH GUPTA @ 2006-01-25 06:27 UTC (permalink / raw)
  To: pgsql-sql; pgsql-general@postgresql.org

hello everybody
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...................!!

--
Thanks & Regards,
Akhilesh
DAV Institute of Management
Faridabad(Haryana)
GSM:-(+919891606064)
          (+911744293789)

"FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME"

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: hi all......................!!
  2006-01-25 06:27 hi all......................!! AKHILESH GUPTA <akhilesh.davim@gmail.com>
@ 2006-01-25 06:50 ` Tino Wildenhain <tino@wildenhain.de>
  2 siblings, 0 replies; 4+ messages in thread

From: Tino Wildenhain @ 2006-01-25 06:50 UTC (permalink / raw)
  To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org

AKHILESH GUPTA schrieb:
> hello everybody
> 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...................!!

Yes it is. All you have to do is to add a rule for updating in the way
you want it to work. When you use pgadmin3 or such tools, you see that
a view is basically a table with one rule for select. For Insert, update
you can add a rule any time.

HTH
Tino Wildenhain



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] hi all......................!!
  2006-01-25 06:27 hi all......................!! AKHILESH GUPTA <akhilesh.davim@gmail.com>
@ 2006-01-25 09:24 ` Richard Huxton <dev@archonet.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Richard Huxton @ 2006-01-25 09:24 UTC (permalink / raw)
  To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org

AKHILESH GUPTA wrote:
> hello everybody
> 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??

There is no automatic updating of views at present.

You can write your own RULES though to do updates - see the manuals for 
details.

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] hi all......................!!
  2006-01-25 06:27 hi all......................!! AKHILESH GUPTA <akhilesh.davim@gmail.com>
@ 2006-01-25 09:27 ` Markus Schaber <schabi@logix-tt.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Markus Schaber @ 2006-01-25 09:27 UTC (permalink / raw)
  To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql; pgsql-general@postgresql.org

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-01-25 09:27 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 06:27 hi all......................!! AKHILESH GUPTA <akhilesh.davim@gmail.com>
2006-01-25 06:50 ` Tino Wildenhain <tino@wildenhain.de>
2006-01-25 09:24 ` Richard Huxton <dev@archonet.com>
2006-01-25 09:27 ` Markus Schaber <schabi@logix-tt.com>

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