Andrew Rawnsley <[EMAIL PROTECTED]> writes: > Sequence information is stored in their individual 1-row tables, with > an entry is pg_class of relkind 'S'. So you can't > really get a list of sequences with last_value in a single query
Nope, you can't ... and I surely hope you weren't expecting that the last_values would all be simultaneously valid ... What I'd try for this is select relname, get_last_value(relname) from pg_class where relkind = 'S'; where get_last_value() is a plpgsql function that does an EXECUTE. But you must realize that there will be time skew between the last_values. What is the problem you really want to solve? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match