Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-28 Thread Alvaro Herrera
Tom Lane wrote: > "Daniel Caune" <[EMAIL PROTECTED]> writes: > > It seems that, in certain condition, row (199,84) is shadowing row > > (3702,85); > > This would be the expected behavior if row (199,84) were an updated > version of row (3702,85), but you couldn't see it yet in your current > trans

Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-28 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > It seems that, in certain condition, row (199,84) is shadowing row > (3702,85); This would be the expected behavior if row (199,84) were an updated version of row (3702,85), but you couldn't see it yet in your current transaction snapshot. A plain SELE

Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-28 Thread Daniel Caune
> De : Tom Lane [mailto:[EMAIL PROTECTED] > > "Daniel Caune" <[EMAIL PROTECTED]> writes: > > I did the following test, removing all the where-clause from the SELECT > statement. Every statement completes immediately, i.e. it doesn't block. > > I think you left out some critical information, like

Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-28 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > I did the following test, removing all the where-clause from the SELECT > statement. Every statement completes immediately, i.e. it doesn't block. I think you left out some critical information, like who else was doing what to the table. What it look

Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE

2007-11-28 Thread Daniel Caune
> -Message d'origine- > De : Tom Lane [mailto:[EMAIL PROTECTED] > Envoyé : mardi, novembre 27, 2007 23:46 > À : Daniel Caune > Cc : pgsql-sql@postgresql.org > Objet : Re: [SQL] Strang behaviour SELECT ... LIMIT n FOR UPDATE > > "Daniel Caune" <[EMAIL PROTECTED]> writes: > > I'm facing a st

Re: [SQL] NULLIF problem

2007-11-28 Thread Erik Jones
On Nov 27, 2007, at 8:47 PM, Michael Glaesemann wrote: On Nov 27, 2007, at 21:04 , Gera Mel Handumon wrote: I encounter an error if i use NULLIF with timestamp with time zone. eq. dbtime=nullif(mytime,'') i want to null the value of field DBTIME if the variable mytime=" " DBTIME ="timestam

Re: [SQL] obtaining column names from tables or views

2007-11-28 Thread Richard Huxton
John van Zantvoort wrote: moin, I've got a question. I'm scripting against an existing postgresql database environment and need to tweak queries based on the columns in the views or tables, how can if find these w/o querying the tables or views. There is a whole section of the manual devoted t

[SQL] obtaining column names from tables or views

2007-11-28 Thread John van Zantvoort
moin, I've got a question. I'm scripting against an existing postgresql database environment and need to tweak queries based on the columns in the views or tables, how can if find these w/o querying the tables or views. Currently I execute the querie and collect the columns but this is rather exp