Skip site navigation (1) Skip section navigation (2)

Re: BUG #4618: nolock changes first column name of query result set to 'nolock'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, brian <b4kramer(at)yahoo(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4618: nolock changes first column name of query result set to 'nolock'
Date: 2009-01-16 14:45:38
Message-ID: 5832.1232117138@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> On Fri, Jan 16, 2009 at 01:22:48PM +0100, Magnus Hagander wrote:
>> I don't know where you got "with (nolock)" from, but that's not
>> PostgreSQL syntax - and AFAIK it's not standard SQL at all. Just remove
>> it and you should be fine.

> "with (nolock)" is a SQL Server-ism for improving performance by
> using dirty reads.

Egad :-(.  All of a sudden I don't feel so bad about WITH becoming
a reserved word in 8.4.  At least we'll throw a syntax error for this
bit of silliness, instead of silently doing something that MSSQL
users won't expect.

Nonetheless, it was royally stupid of MS to adopt an extension
syntax that looks exactly like a table alias to a parser that
doesn't think that WITH is reserved.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-01-16 15:04:08
Subject: Re: BUG #4619: pg_ctl reports strange error message when be executed on non executable directory
Previous:From: Alvaro HerreraDate: 2009-01-16 14:22:01
Subject: Re: pg_listener entries deleted under heavy NOTIFY loadonly on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group