From: Laurent Patureau <lpatureau@idfr.net>
To: pgsql-sql@postgresql.org
Subject: Function and insert
Date: Wed, 27 Nov 2002 12:05:11 +0100
Message-ID: <5.0.0.25.0.20021127120232.00c69aa0@pop.noos.fr> (raw)
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
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-sql@postgresql.org
Cc: lpatureau@idfr.net
Subject: Re: Function and insert
In-Reply-To: <5.0.0.25.0.20021127120232.00c69aa0@pop.noos.fr>
* 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