Re: Lock ACCESS EXCLUSIVE and Select question !

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Alan Acosta <zagato(dot)gekko(at)gmail(dot)com>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Subject: Re: Lock ACCESS EXCLUSIVE and Select question !
Date: 2011-02-28 22:51:57
Message-ID: 201102281451.58263.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2011-02-28 22:56:49 Re: slow building index and reference after Sybase to Pg
Previous Message Gary Fu 2011-02-28 22:45:01 Re: slow building index and reference after Sybase to Pg