Martijn van Oosterhout <kleptog@xxxxxxxxx> writes: > On Mon, May 15, 2006 at 03:55:49PM +0300, Forums @ Existanze wrote: >> I have been able to get the sequence names, but I can get their values all >> in one query. > Select sequence.last_value; The hard part of the request is to do it "all in one query", though, ie somehow show select relname, last_value from pg_class where relkind = 'S'; I haven't been able to think of a way to do that, unless you want to assume the existence of a plpgsql helper function. There's an open request to list last_values in psql's "\ds", and it'd be real nice to be able to do it all in one query for that. regards, tom lane