Function and insert

Поиск
Список
Период
Сортировка
От Laurent Patureau
Тема Function and insert
Дата
Msg-id 5.0.0.25.0.20021127120232.00c69aa0@pop.noos.fr
обсуждение исходный текст
Ответы Big query problem  (Tomas Berndtsson <tomas@nocrew.org>)
Re: Function and insert  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: Tilo Schwarz
Дата:
Сообщение: Re: Question on SQL and pg_-tables
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: FreeBSD, Linux: select, select count(*) performance