Trying to write a function...

Поиск
Список
Период
Сортировка
От Wim
Тема Trying to write a function...
Дата
Msg-id 3D3EFBB1.9040904@belbone.be
обсуждение исходный текст
Ответы Re: Trying to write a function...  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
Hello,

I'm trying to write a function that add new rows to a table, but I don't 
succeed.....
It's something like this:

CREATE FUNCTION f_addrtr (varchar(16),varchar(32)) RETURNS bool AS '
DECLARE
index int4;
BEGIN
index := 'nextval('s_routerid')';
INSERT INTO t_routers VALUES (index, $1, $2);
RETURN 1;
END;'
LANGUAGE 'plpgsql';

What am I doing wrong?


Cheers!

Wim.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Chris Ruprecht
Дата:
Сообщение: Re: Last record
Следующее
От: Tom Lane
Дата:
Сообщение: Re: RES: RES: Queries not using Index