Received: from cr15.cristorei.com.br (cr15.cristorei.com.br [200.230.89.96]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBEHuF021118 for ; Thu, 14 Dec 2000 12:56:16 -0500 (EST) (envelope-from mestredosmagos@marilia.com) Received: from marilia.com (escritorio.akacia.com.br [200.230.89.78]) by cr15.cristorei.com.br (8.9.3/8.8.7) with ESMTP id PAA06030 for ; Thu, 14 Dec 2000 15:57:32 -0200 Message-ID: <3A390BF7.71D0E481@marilia.com> Date: Thu, 14 Dec 2000 16:05:43 -0200 From: Tulio Oliveira Organization: Akacia Tecnologia X-Mailer: Mozilla 4.73 [pt_BR] (X11; U; Linux 2.2.14-19cl i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Compiling "C" Functions Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200012/151 X-Sequence-Number: 485 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. -- ====================================================== AKACIA TECNOLOGIA Desenvolvimento de sistemas para Internet www.akacia.com.br