From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Vincenzo Romano" <vincenzo(dot)romano(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [PGSQL 8.2.x] INSERT+INSERT |
Date: | 2007-06-22 15:43:38 |
Message-ID: | 871wg4nget.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Vincenzo Romano" <vincenzo(dot)romano(at)gmail(dot)com> writes:
>> Or wrap it around SQL function:
>
> That's the way I'm doind now even if in a slightly different way.
> 20+ million calls will badly slooow down the DB insertions
Are you sure? How much?
> and require you to know the exact name of the implicit sequence
If you're sure you only have a single sequence being bumped here (no triggers
inserting somewhere else, or other columns with sequences for default values,
etc) then you could use lastval().
> and, more important, not to have any concurrent accesses to it.
huh? no, sequences don't require this. They would be pointless if they did.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Mortell | 2007-06-22 15:50:44 | How determine a Views dependents |
Previous Message | Jean-David Beyer | 2007-06-22 15:35:34 | Embedded C++ with ecpg? |