On Apr 28, 2:00 am, pate...@patearl.net (Patrick Earl) wrote:
> This is a follow-up to an old message by Tom Lane:
>
> http://archives.postgresql.org/pgsql-sql/2006-10/msg00080.php
>
[...]
>
> select * from Pet
> left join Dog on Dog.Id = Pet.Id
> left join Cat on Cat.Id = Pet.Id
>
> Now suppo
This is a follow-up to an old message by Tom Lane:
http://archives.postgresql.org/pgsql-sql/2006-10/msg00080.php
In ORMs like NHibernate, there are a few strategies for mapping
inheritance to SQL. One of these is "Joined Subclass," which allows
for the elimination of duplicate data and clean
Oh that's sweet and all I needed anyway thanks.
On Oct 6, 2006, at 12:25 PM, Tom Lane wrote:
Note that you can select "FOR UPDATE OF a" in this situation, it's
just
the B side that is problematic.
James Robinson
Socialserve.com
---(end of broadcast)---
James Robinson <[EMAIL PROTECTED]> writes:
> select a.id, b.id from foo a left outer join bar b on (b.a_id =
> a.id) for update;
> SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an
> outer join
> Is this behavior spec-mandated, or could only the rows in B which are
>
Given something like:
create table foo (id int primary key not null);
create table bar (id int primary key not null, a_id int references
foo(id));
select a.id, b.id from foo a left outer join bar b on (b.a_id =
a.id) for update;
PG 8.1.4 balks, saying:
SELECT FOR UPDATE/SHARE can
On December 6, 2002 02:10 pm, Bruce Momjian wrote:
> It should lock only the rows you retrieved, but I have no idea how FOR
> UPDATE and INTO TEMP behave. My guess is that it should work fine, but
> I have never seen those two used together before.
Turns out that it wasn't the SELECT ... FOR UPDA
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes:
> We have the following query:
> SELECT certificate_id
> INTO TEMP TABLE x_certs
> FROM certificate
> WHERE cert_status = 0 AND
> certificate_id BETWEEN AND AND
> client_id IN (1, 2, 3)
> ORDER BY certificate_i
It should lock only the rows you retrieved, but I have no idea how FOR
UPDATE and INTO TEMP behave. My guess is that it should work fine, but
I have never seen those two used together before.
---
D'Arcy J.M. Cain wrote:
> W
We have the following query:
SELECT certificate_id
INTO TEMP TABLE x_certs
FROM certificate
WHERE cert_status = 0 AND
certificate_id BETWEEN AND AND
client_id IN (1, 2, 3)
ORDER BY certificate_id
FOR UPDATE;
Is there any reason that this query should
On Wed, 20 Nov 2002, Justin Georgeson wrote:
> I'm pretty new to databases in general, and would like to find a spiffy
> way to do something. I want to use two columns from one table to
> populate three columns in two other tables. Assuming t1 is the table I
> want to take the values from, here is
I'm pretty new to databases in general, and would like to find a spiffy
way to do something. I want to use two columns from one table to
populate three columns in two other tables. Assuming t1 is the table I
want to take the values from, here is the structure of what I want to
insert into t2 an
Hi all.
I have a problem with an application written in php.
I need to lock a record for update, and I use the following transaction:
BEGIN WORK;
//row1 is an indexed field
SELECT row1, row2 from table1 where row3 = NULL order by row1 FOR UPDATE
limit 1;
//fetch row1 in $myvar
UPDATE table1 set
'select ... for update' needs to be inside a transaction. plpgsql cannot
start or end transactions. 'begin' and 'end' are not transaction
statements. (read the docs).
-Cedar
On Fri, 20 Apr 2001, Jie Liang wrote:
>
> Hi,
>
> I have a question about 'select ... for update';
> according to t
I have to create a program to use the lastest version of PostgreSQL.
Many processes of this program must run in parallele.
In a table I have to select some specific row next insert a new row with
the same search carateristiques
and commit.
But between the select and the insert action none other
On Wed, 28 Mar 2001, Marcos Minshew wrote:
> I am interested in using the SELECT ... FOR UPDATE feature but it doesn't
> work quite the way I had hoped. If there is a better/different way of doing
> this please enlighten me.
>
> If I issue:
>
> BEGIN;
> SELECT * FROM atable WHERE atable.key
I am interested in using the SELECT ... FOR UPDATE feature but it doesn't
work quite the way I had hoped. If there is a better/different way of doing
this please enlighten me.
If I issue:
BEGIN;
SELECT * FROM atable WHERE atable.key = 10 FOR UPDDATE;
in one session and then issue the same comm
> > Hi,
>
> How can I use select ... for update to update limit to update what I
> select??
First thing - the SELECT FOR UPDATE is not merge of SELECT and UPDATE
but transaction option. The PostgreSQL use row-locking for UPDATEed rows.
Standard SELECT ignore this lock, but SELECT FOR UPDATE wa
> Hi,
How can I use select ... for update to update limit to update what I
select??
somewhat like:
select url,id from mytable for update order by priority,id limit 5;
I want update the id in above return like:
update mytable set allocatedto='whatever' where id in above return set.
Could I do it i
18 matches
Mail list logo