| From: | Michael Shapiro <mshapiro51(at)gmail(dot)com> |
|---|---|
| To: | Dave Page <dpage(at)pgadmin(dot)org> |
| Cc: | PgAdmin Support <pgadmin-support(at)postgresql(dot)org> |
| Subject: | Re: sequence current value |
| Date: | 2021-05-14 16:32:23 |
| Message-ID: | CAGCvxea6DrrDRO77k4M4Zb-Nqy-gMmjz_5UR4ji3rnut+fdU8A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgadmin-support |
I tried this. I created a sequence, and ran last_value, then nextval,
repeatedly. last_value always returned 20 until nextval returned 21, then
last_value returned 40 and kept returning 40 until nextval returned 41, etc.
On Fri, May 14, 2021 at 9:39 AM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>
> On Fri, May 14, 2021 at 3:33 PM Michael Shapiro <mshapiro51(at)gmail(dot)com>
> wrote:
>
>> How does PgAdmin get the current value of a sequence when showing the
>> sequence properties?
>>
>
> SELECT last_value FROM <sequence_name>;
>
> (essentially. It gets a few other things as well)
>
> --
> Dave Page
> Blog: https://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | dsbw | 2021-05-14 22:39:48 | Re: Import fails on single quote. |
| Previous Message | Dave Page | 2021-05-14 14:39:28 | Re: sequence current value |