Re: Lock ACCESS EXCLUSIVE and Select question ! - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Lock ACCESS EXCLUSIVE and Select question !
Date
Msg-id 201102281451.58263.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: Lock ACCESS EXCLUSIVE and Select question !  (Alan Acosta <zagato.gekko@gmail.com>)
List pgsql-general
On Monday, February 28, 2011 2:39:07 pm Alan Acosta wrote:
> But i have a new problem there, i have no rows for update, i create new
> rows when the seats are sold, cause rarely the database knows the capacity
> of the bus, number of seats, even some bus doesn't have seat number 4 for
> example

So how does the customer know what seat to choose? Or to put it another way,
when the INSERT is done where does the seat number come from?

>
> :p. So i cannot SELECT FOR UPDATE no existent rows, but i still need to
> :lock
>
> in some way in order to check if seat number X was already sold or is free
> !
>
> Alan Acosta

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Gary Fu
Date:
Subject: Re: slow building index and reference after Sybase to Pg
Next
From: Andres Freund
Date:
Subject: Re: slow building index and reference after Sybase to Pg