Re: Support for grabbing multiple consecutive values with nextval() - Mailing list pgsql-hackers

From Ronan Dunklau
Subject Re: Support for grabbing multiple consecutive values with nextval()
Date
Msg-id 12014130.O9o76ZdvQC@aivenronan
Whole thread Raw
In response to Support for grabbing multiple consecutive values with nextval()  (Jille Timmermans <jille@quis.cx>)
Responses Re: Support for grabbing multiple consecutive values with nextval()
List pgsql-hackers
> It is Friday here, so I would easily miss something..  It is possible
> to use COPY FROM with a list of columns, so assuming that you could
> use a default expression with nextval() or just a SERIAL column not
> listed in the COPY FROM query to do the job, what do we gain with this
> feature?  In which aspect does the preallocation of a range handled
> on the client side after being allocated in the backend make things
> better?

The problem the author wants to solve is the fact they don't have a way of 
returning the ids when using COPY FROM. Pre-allocating them and assigning them 
to the individual records before sending them via COPY FROM would solve that 
for them.

-- 
Ronan Dunklau





pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Building PostgreSQL in external directory is broken?
Next
From: Tom Lane
Date:
Subject: Re: Building PostgreSQL in external directory is broken?