postgresql 8:
CREATE TABLE "InetLog" (
"ID" bigint DEFAULT nextval('public."InetLog_ID_seq"'::text) NOT NULL,
"Void" boolean DEFAULT false NOT NULL,
"StartTime" timestamp without time zone NOT NULL,
"Duration" interval NOT NULL,
"MacAddress" macaddr NOT NULL
);
inet=> insert into "InetLog" values(default,true,'2005-10-23 16:30:02','300 seconds','AA:BB:CC:DD:EE:FF');
INSERT 0 1
inet=> select * from "InetLog";
ID | Void | StartTime | Duration | MacAddress
----+------+------------------------+----------+-------------------
3 | t | 2005-10-23 16:30:02+02 | 00:05:00 | aa:bb:cc:dd:ee:ff
(1 row)
net=> select currval('InetLog_ID_seq');
ERROR: relation "inetlog_id_seq" does not exist
inet=> select currval('InetLog.InetLog_ID_seq');
ERROR: schema "inetlog" does not exist
inet=> select currval('public.InetLog_ID_seq');
ERROR: relation "public.inetlog_id_seq" does not exist
how can I get the current value of ID ?