Thread: How to make an INSERT INTO to a view?

How to make an INSERT INTO to a view?

From
Andre Lopes
Date:
Hi,
 
I'am new to PostGre... I need to insert to a view. For security measures the users will be only able to insert to views.
 
How can I do that? INSERT INTO a view in PostGreSQL
 
 
Best Regards,
André.
 

Re: How to make an INSERT INTO to a view?

From
"A. Kretschmer"
Date:
In response to Andre Lopes :
> Hi,
>  
> I'am new to PostGre... I need to insert to a view. For security measures the
> users will be only able to insert to views.
>  
> How can I do that? INSERT INTO a view in PostGreSQL

You have to create a rule.

http://www.postgresql.org/docs/8.3/static/rules-update.html


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

Re: How to make an INSERT INTO to a view?

From
Jeff Davis
Date:
On Thu, 2009-07-30 at 20:37 +0100, Andre Lopes wrote:
> I'am new to PostGre... I need to insert to a view. For security
> measures the users will be only able to insert to views.

Take a look at the rules system:
http://www.postgresql.org/docs/8.4/static/rules.html

Regards,
    Jeff Davis