Re: pgwin32_open returning EINVAL - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pgwin32_open returning EINVAL
Date
Msg-id 20071220160122.GF26753@svr2.hagander.net
Whole thread Raw
In response to Re: pgwin32_open returning EINVAL  ("Trevor Talbot" <quension@gmail.com>)
List pgsql-hackers
On Thu, Dec 20, 2007 at 07:57:23AM -0800, Trevor Talbot wrote:
> > I'd expect the compiler to optimize away those, but I'll make it a var
> > anyawy.
> 
> It can't; it's an opaque callout to kernel32.dll, and there's nothing
> that tells the optimizer when you can expect to get the same result.
> That said, it's cheaper than it looks, since the error code is stored
> at a fixed location in thread-specific VM space. I guess it wasn't
> interesting enough to make an MSVC intrinsic instead of keeping it a
> system detail.

Interesting. I was certainly it was an intrinsic, but it seems not...
Variable, it is..

//Magnus


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgwin32_open returning EINVAL
Next
From: Tom Lane
Date:
Subject: Re: duplicate columns with COPY