pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tulio@pcfacil.com.br
To: pgsql-docs@postgresql.org
Subject: Compiling C Functions
Date: Tue, 12 Dec 2000 22:41:40 -0000
Message-ID: <200012122241.UAA09887@cr15.cristorei.com.br> (raw)


Hi, ALL

This is my first time in this list... Sorry by any inconvenience....

I need a TRIGGER thats runs whith POSTGRES permissions. I´ll give an ODBC 
connection for programmers that don´t need to know the "rules" of my Data 
Base.

So, I´ll creata an "fake" table, and with a BEFORE INSERT TRIGGER I´ll make 
all consistences, and update the REAL tables.

The ODBC users have only INSERT permission on the fake table, and NO RIGHTS 
on the real table.

I´ll make VIEWS whith SELECT, UPDATE and DELETE permissions for the ODBC 
users.

By the same way, I´ll make TRIGGERS that manager the VIEWS.

-----------

ALMOST ALL THIS WORK FINE when the function of the trigger is in PLPGSQL, but 
in this language, the Trigger run with the same ODBD user´s rights ....

I read that only a "C" function runs with POSTGRES permissions, but all the 
samples I get don´t work... I can´t even compile them...

Please, anyone could help an "poor brazilian guy" to make this work :-) ?

I appreciate any "C" Function complete samples, including de command line for 
the compiler.

I using a RedHat Linux 6.2 and  Postgresql 7.0.2-2 


Best Regards,

Tulio Oliveira.





Message-ID: <200012122241.UAA09887@cr15.cristorei.com.br>
Permalink:  ../200012122241.UAA09887@cr15.cristorei.com.br/
Also on:    postgresql.org/message-id/200012122241.UAA09887@cr15.cristorei.com.br

 · 

reply

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-docs@postgresql.org
  Cc: tulio@pcfacil.com.br
  Subject: Re: Compiling C Functions
  In-Reply-To: <200012122241.UAA09887@cr15.cristorei.com.br>

* 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