RE: [EXTERNAL] Any objection to documenting pg_sequence_last_value()?

From: Hanefi Onaldi <Hanefi(dot)Onaldi(at)microsoft(dot)com>
To: James Coleman <jtc331(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Marco Slot <Marco(dot)Slot(at)microsoft(dot)com>, Onder Kalaci <onderk(at)microsoft(dot)com>
Subject: RE: [EXTERNAL] Any objection to documenting pg_sequence_last_value()?
Date: 2021-03-30 08:37:31
Message-ID: DM6PR21MB1497482986C5C773BEEBB064E37D9@DM6PR21MB1497.namprd21.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I recently used pg_sequence_last_value() when working on a feature in an extension, and it would have been easier for me if there were some documentation for this function.

I'd like to help document this function if there are no objections.

Best,
Hanefi

-----Original Message-----
From: James Coleman <jtc331(at)gmail(dot)com>
Sent: 6 Ağustos 2020 Perşembe 16:14
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [EXTERNAL] Any objection to documenting pg_sequence_last_value()?

The function pg_sequence_last_value() was added to underlie the pg_sequences view, and it's the only way I'm aware of from userspace to directly get the last value of a sequence globally (i.e., not within the current session like currval()/lastval()). Obviously you can join to the pg_sequences view, but that's sometimes unnecessarily cumbersome since it doesn't expose the relid of the sequence.

When that function got added it apparently wasn't added to the docs, though I'm not sure if that was intentional or not.

Does anyone have any objections to documenting
pg_sequence_last_value() in the sequence manipulation functions doc page?

James

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-03-30 08:49:24 Re: Idea: Avoid JOINs by using path expressions to follow FKs
Previous Message Amit Kapila 2021-03-30 08:33:50 Re: [PATCH] Provide more information to filter_prepare