MySQL last_insert_id() , PostgreSQL

PostgreSQLMySQL の last_insert_id() と同様の機能、

LASTVAL()

(例)

CREATE TABLE  items (
    id serial not null primary key,
    name varchar(128) not null
);

実行

INSERT INTO items (name) VALUES (‘Lemon’);
SELECT LASTVAL();

でも、
www.postgresql.org