Re: Insert into VIEW using RULE. Not possible to use nextval()?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Collin Peters <cadiolis(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Insert into VIEW using RULE. Not possible to use nextval()?
Date: 2007-05-04 22:16:51
Message-ID: 188322.23616.qm@web31808.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- Collin Peters <cadiolis(at)gmail(dot)com> wrote:

> 2. currval() is guaranteed to be correct within the RULE. This was my
> second question. If I call "INSERT INTO Vschematic_insert(..."
> simultaneously 1000 times is it guaranteed to be correct?

To illistrate using psudo code:

//This will always work:

For i = 1 to 1000 do
INSERT INTO Vschematic VALUES ( .. some unique values .. );
Next i

//These will always fail:
INSERT INTO Vschematic SELECT * FROM A_TABLE LIMIT 1000;
or
INSERT INTO Vschematic VALUES ( unique vals 1),(unique vals 2), ..., (unique vals n);

Regards,
Richard Broersma Jr.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2007-05-05 00:57:07 Re: select slows from 3 seconds to 30 seconds
Previous Message Collin Peters 2007-05-04 21:51:00 Re: Insert into VIEW using RULE. Not possible to use nextval()?