Masis, Alexander (US SSA) wrote:
> 
>    "SELECT CURRVAL(
> pg_get_serial_sequence('my_tbl_name','id_col_name'));"
> 

Any reason why you can't just do this?

CREATE FUNCTION last_insert_id() RETURNS bigint AS $$
  SELECT lastval();
$$ LANGUAGE SQL VOLATILE;

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to