Re: Insert into VIEW using RULE. Not possible to use nextval()? - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Insert into VIEW using RULE. Not possible to use nextval()?
Date
Msg-id 188322.23616.qm@web31808.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Insert into VIEW using RULE. Not possible to use nextval()?  ("Collin Peters" <cadiolis@gmail.com>)
List pgsql-sql
--- Collin Peters <cadiolis@gmail.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 doINSERT 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.


pgsql-sql by date:

Previous
From: "Collin Peters"
Date:
Subject: Re: Insert into VIEW using RULE. Not possible to use nextval()?
Next
From: Tom Lane
Date:
Subject: Re: select slows from 3 seconds to 30 seconds