Re: Dedect unknown database in 08.01.0100 and Postgres 8.1 - Mailing list pgsql-odbc

From Dave Page
Subject Re: Dedect unknown database in 08.01.0100 and Postgres 8.1
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4E7DE85@ratbert.vale-housing.co.uk
Whole thread Raw
In response to Dedect unknown database in 08.01.0100 and Postgres 8.1  ("Andrus" <eetasoft@online.ee>)
Responses Re: Dedect unknown database in 08.01.0100 and Postgres 8.1
List pgsql-odbc

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Tom Lane
> Sent: 08 November 2005 19:02
> To: Andrus
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Dedect unknown database in 08.01.0100 and
> Postgres 8.1
>
> "Andrus" <eetasoft@online.ee> writes:
> > Earlier odbc driver with Postgres 8.0 returns special error
> text in this
> > case:
> > FATAL:  database "foo" does not exist
>
> > New ODBC driver with Postgres 8.1 returns the same error in
> all cases:
> > Could not connect to the server
>
> This seems like a serious regression in behavior.  Why isn't
> the driver
> returning the error string provided by libpq?

Some left-over debugging code from the port to libpq by the looks of it.
Fix committed, though interestingly in my testing I *almost* always got
the following message from libpq rather than the expected username or db
doesn't exist message:

could not receive data from server: The system cannot find the path
specified.
 (0x00000003/3)

Also, am I right in thinking there is no way to get an sqlstate code
from a libpq connection, or did I miss something in the docs? I realise
of course that you can get one from a result object.

Regards, Dave

pgsql-odbc by date:

Previous
From: "Leendert Paul Diterwich"
Date:
Subject: Anyone using PostgresODBC and .NET 2.0?
Next
From: Håkon Clausen
Date:
Subject: SQLRowCount