pgwin32_open returning EINVAL - Mailing list pgsql-hackers

From Alvaro Herrera
Subject pgwin32_open returning EINVAL
Date
Msg-id 20071128145735.GK5118@alvh.no-ip.org
Whole thread Raw
Responses Re: pgwin32_open returning EINVAL  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Hi,

We've seen several cases of people (running 8.1 or 8.2) that see
messages like this:

2007-11-26 11:41:59 ERROR:  could not open relation 1663/352369/353685: Invalid argument

The platform is Win32.

The problem is that pgwin32_open reduces any error code from
GetLastError that's not ERROR_PATH_NOT_FOUND, ERROR_FILE_NOT_FOUND,
ERROR_FILE_EXISTS or ERROR_ACCESS_DENIED into EINVAL, without further
notice.  This is problematic because the true cause of the problem is
being hidden and it's hard to track down what's going on.

Can we do something like this to report the Win32 error code so that the
user has a higher chance of figuring out what's going on?

--
Alvaro Herrera                          Developer, http://www.PostgreSQL.org/
"Las navajas y los monos deben estar siempre distantes"   (Germán Poo)

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Next
From: Tom Lane
Date:
Subject: Re: Still a NOTICE in dict_thesaurus.c