Re: Switching identity column to serial

2023-02-03 Thread Ron
On 2/3/23 22:41, Ron wrote: On 2/3/23 18:54, Erik Wienhold wrote: I was wondering if it's possible to drop a column identity (not the column itself) while keeping the attached sequence. This would avoid recreating an identical sequence (especially with a correct start value and owner). Why do

Re: Switching identity column to serial

2023-02-03 Thread Ron
On 2/3/23 18:54, Erik Wienhold wrote: I was wondering if it's possible to drop a column identity (not the column itself) while keeping the attached sequence. This would avoid recreating an identical sequence (especially with a correct start value and owner). Why doesn't this work? BEGIN; DROP

Re: Switching identity column to serial

2023-02-03 Thread Erik Wienhold
> On 04/02/2023 01:54 CET Erik Wienhold wrote: > > I was wondering if it's possible to drop a column identity (not the column > itself) while keeping the attached sequence. This would avoid recreating > an identical sequence (especially with a correct start value and owner). > > Changing the sequ

Switching identity column to serial

2023-02-03 Thread Erik Wienhold
I was wondering if it's possible to drop a column identity (not the column itself) while keeping the attached sequence. This would avoid recreating an identical sequence (especially with a correct start value and owner). Changing the sequence owner to NONE before dropping identity is not allowed.

Re: Sequence vs UUID

2023-02-03 Thread Dominique Devienne
On Fri, Feb 3, 2023 at 5:48 PM veem v wrote: > Actually I did the testing by connecting to "https://dbfiddle.uk/"; > postgres version -15. > > PostgreSQL 15.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 > 20210514 (Red Hat 8.5.0-10), 64-bit > > Am I doing it wrong, please confirm? > > No

Re: Sequence vs UUID

2023-02-03 Thread veem v
Actually I did the testing by connecting to "https://dbfiddle.uk/"; postgres version -15. PostgreSQL 15.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit Am I doing it wrong, please confirm? On Fri, 3 Feb 2023 at 21:28, Dominique Devienne wrote: > Copyi

Fwd: Sequence vs UUID

2023-02-03 Thread Dominique Devienne
Copying the list... -- Forwarded message - From: Dominique Devienne Date: Fri, Feb 3, 2023 at 4:57 PM Subject: Re: Sequence vs UUID To: veem v On Thu, Feb 2, 2023 at 8:47 PM veem v wrote: > Tested the UUIDv7 generator for postgres as below. > With regards to performance , It's

Re: Sequence vs UUID

2023-02-03 Thread Miles Elam
On Thu, Feb 2, 2023 at 11:47 AM veem v wrote: > Tested the UUIDv7 generator for postgres as below. > > With regards to performance , It's still way behind the sequence. I was > expecting the insert performance of UUID v7 to be closer to the sequence , > but it doesn't seem so, as it's 500ms vs 30