function and passing the table name to be used with SQL stmnt
От
kamiseq
Тема
function and passing the table name to be used with SQL stmnt
Дата
Msg-id
1193685486.126960.251720@57g2000hsv.googlegroups.com
Список
Дерево обсуждения
function and passing the table name to be used with SQL stmnt kamiseq <kamiseq@gmail.com>
Re: function and passing the table name to be used with SQL stmnt kamiseq <kamiseq@gmail.com>
Re: function and passing the table name to be used with SQL stmnt kamiseq <kamiseq@gmail.com>
Re: function and passing the table name to be used with
SQL stmnt Douglas McNaught <doug@mcnaught.org>
ok so my probelm is I have a simple function like this
CREATE OR REPLACE FUNCTION bookid(_tabela varchar) RETURNS integer AS $
$
DECLARE
_id integer := 0;
BEGIN
SELECT INTO _id id FROM _tabela order by id desc limit 1;
RETURN _id+1;
END;
$$ LANGUAGE plpgsql;
and the problem is i can run this function cos im passing string to
SQL statement and not the table object. hym what can I do about it to
have function that will give me next id number back;
В списке pgsql-general по дате отправления