On Tue, Jul 14, 2015 at 11:05 AM, Thom Brown <t...@linux.com> wrote: > On 14 July 2015 at 16:02, David G. Johnston <david.g.johns...@gmail.com> > wrote: > >> On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown <t...@linux.com> wrote: >> >>> The use-case I have in mind is for finding out how close to the 32-bit >>> integer limit sequences have reached. At the moment, this isn't possible >>> without creating a custom function to go fetch the last_value from the >>> specified sequence. >>> >>> >> Why wouldn't you just query the catalog? I was under the impression >> last said values were extra-transactional so that table should reflect the >> global state. >> >> What am I missing here? >> > > Where in the catalog do you mean? > > In attempting to answer your question I now better understand your original proposal. Indeed the only way to get the sequence information is to query it like a table.
This prompts the question: why a function and not (or in addition to) to a view? David J.