Trying to write a function...

From: Wim <wdh(at)belbone(dot)be>
To: pgsql-sql(at)postgresql(dot)org
Subject: Trying to write a function...
Date: 2002-07-24 19:10:41
Message-ID: 3D3EFBB1.9040904@belbone.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ligia Pimentel 2002-07-24 19:38:50 how do I change regional setting for dates?
Previous Message Josh Berkus 2002-07-24 18:26:27 Re: Trying to write a function...