Re: [HACKERS] Support retrieving value from any sequence

2015-07-17 Thread Jim Nasby
On 7/14/15 12:06 PM, Tom Lane wrote: Thom Brown writes: On 14 July 2015 at 17:17, Robert Haas wrote: Since it's trivial to define this function if you need it, I'm not sure there's a reason to include it in core. It's not always possible to create functions on a system when access is restr

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Tom Lane
Thom Brown writes: > On 14 July 2015 at 17:17, Robert Haas wrote: >> Since it's trivial to define this function if you need it, I'm not >> sure there's a reason to include it in core. > It's not always possible to create functions on a system when access > is restricted. It may even be the case

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Thom Brown
On 14 July 2015 at 17:17, Robert Haas wrote: > > On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown wrote: > > When using currval() to find the current value of all sequences, it chokes > > on those that aren't initialised. This is expected and documented as > > behaving in this manner. However, I th

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown wrote: > When using currval() to find the current value of all sequences, it chokes > on those that aren't initialised. This is expected and documented as > behaving in this manner. However, I think it would be useful to also > support retrieving the

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 11:05 AM, Thom Brown wrote: > On 14 July 2015 at 16:02, David G. Johnston > wrote: > >> On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown 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 mom

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Thom Brown
On 14 July 2015 at 16:02, David G. Johnston wrote: > On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown 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

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown 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. >