pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Read-Only Views?
3+ messages / 3 participants
[nested] [flat]

* Read-Only Views?
@ 2003-07-18 17:26 Naomi Walker <nwalker@eldocomp.com>
  2003-07-18 17:39 ` Re: Read-Only Views? scott.marlowe <scott.marlowe@ihs.com>
  2003-07-18 18:06 ` Re: Read-Only Views? Arguile <arguile@lucentstudios.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Naomi Walker @ 2003-07-18 17:26 UTC (permalink / raw)
  To: pgsql-admin


I noticed in some (older) documentation that views were read-only?  Is this 
still the case?

Naomi


-------------------------------------------------------------------------------------------------------------------------
Naomi Walker                         Chief Information Officer
                                               Eldorado Computing, Inc.
nwalker@eldocomp.com           602-604-3100
-------------------------------------------------------------------------------------------------------------------------
Do not follow where the path may lead.  Go, instead and leave a trail.
-Robert Frost
-------------------------------------------------------------------------------------------------------------------------

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.



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

* Re: Read-Only Views?
  2003-07-18 17:26 Read-Only Views? Naomi Walker <nwalker@eldocomp.com>
@ 2003-07-18 17:39 ` scott.marlowe <scott.marlowe@ihs.com>
  1 sibling, 0 replies; 3+ messages in thread

From: scott.marlowe @ 2003-07-18 17:39 UTC (permalink / raw)
  To: Naomi Walker <nwalker@eldocomp.com>; +Cc: pgsql-admin

Yep.  by default views are not updateable in postgresql.  However, they 
can be made updateable by triggers.  Note that not all views are 
inherently updateable, just the simplest.  for instance how would you 
update:

create view bigview as select g1.id, t1.f1*t2.f2, t1.f3/t3.f4 from tabl1 
t1, table2 t2, table3 t3 where t1.id=t2.t1id and t1.id=t3.t1id

?

On Fri, 18 Jul 2003, Naomi Walker wrote:

> 
> I noticed in some (older) documentation that views were read-only?  Is this 
> still the case?
> 
> Naomi
> 
> 
> -------------------------------------------------------------------------------------------------------------------------
> Naomi Walker                         Chief Information Officer
>                                                Eldorado Computing, Inc.
> nwalker@eldocomp.com           602-604-3100
> -------------------------------------------------------------------------------------------------------------------------
> Do not follow where the path may lead.  Go, instead and leave a trail.
> -Robert Frost
> -------------------------------------------------------------------------------------------------------------------------
> 
> -- CONFIDENTIALITY NOTICE --
> 
> This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 




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

* Re: Read-Only Views?
  2003-07-18 17:26 Read-Only Views? Naomi Walker <nwalker@eldocomp.com>
@ 2003-07-18 18:06 ` Arguile <arguile@lucentstudios.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Arguile @ 2003-07-18 18:06 UTC (permalink / raw)
  To: Naomi Walker <nwalker@eldocomp.com>; +Cc: pgsql-admin

On Fri, 2003-07-18 at 13:26, Naomi Walker wrote:
> I noticed in some (older) documentation that views were read-only?  Is this 
> still the case?

Yes, views are read-only unless you define rules for how they can be
inserted/updated/deleted from.

See these for how to create those rules:
http://developer.postgresql.org/docs/postgres/rules.html
http://developer.postgresql.org/docs/postgres/rules-update.html




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


end of thread, other threads:[~2003-07-18 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18 17:26 Read-Only Views? Naomi Walker <nwalker@eldocomp.com>
2003-07-18 17:39 ` scott.marlowe <scott.marlowe@ihs.com>
2003-07-18 18:06 ` Arguile <arguile@lucentstudios.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