"Vincenzo Romano" <[EMAIL PROTECTED]> 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 se
I think it would be greatly helpful if the insert...returning could be
seen as a "select" statement and, thus, being usable in the way I
have described. I suspect that the insert...returning is actually
implemented as an inser plus a select.
You can create a function which does the INSERT RET
On Thursday 21 June 2007 15:47:17 Dawid Kuroczko wrote:
> On 6/21/07, Vincenzo Romano <[EMAIL PROTECTED]> wrote:
> > Hi all.
> > I'd like to do the following:
> >
> > insert into t1
> > values (
> > 'atextvalue',(
> > insert into t2
> > values ( 'somethingelse' )
> > ret
On 6/21/07, Vincenzo Romano <[EMAIL PROTECTED]> wrote:
Hi all.
I'd like to do the following:
insert into t1
values (
'atextvalue',(
insert into t2
values ( 'somethingelse' )
returning theserial
)
)
;
that is, I first insert data into t2 getting back the newly c
Hi all.
I'd like to do the following:
insert into t1
values (
'atextvalue',(
insert into t2
values ( 'somethingelse' )
returning theserial
)
)
;
that is, I first insert data into t2 getting back the newly created
serial values, then i insert this values in anoth