Function and insert - Mailing list pgsql-sql

From Laurent Patureau
Subject Function and insert
Date
Msg-id 5.0.0.25.0.20021127120232.00c69aa0@pop.noos.fr
Whole thread Raw
Responses Big query problem
Re: Function and insert
List pgsql-sql
Hi,

I want to do a function that insert a row on a table like :

CREATE FUNCTION ajout_secu(INT4) RETURNS OID    AS 'INSERT INTO test_2 VALUES($1);'    LANGUAGE 'SQL';

PG refuse to accept the type returns oid as the function is not a SELECT.
What can I do ?

thanks for your help,

LP




pgsql-sql by date:

Previous
From: Tilo Schwarz
Date:
Subject: Re: Question on SQL and pg_-tables
Next
From: Achilleus Mantzios
Date:
Subject: FreeBSD, Linux: select, select count(*) performance