Error : SQL state: 58000 - Mailing list pgsql-hackers

From Soumya Ghosh
Subject Error : SQL state: 58000
Date
Msg-id CH3PR14MB6794E37F2BC2F1A15354F07290CAA@CH3PR14MB6794.namprd14.prod.outlook.com
Whole thread Raw
List pgsql-hackers

 

Dear Concern, 

 

We are trying to connect SQL Server from PostgreSQL through odbc_fdw extension.  

We are using PostgreSQL version 15 and enclosed installed extension is attached. First, we create the foreign server.  

Then we map the postgres user and created foreign table as per the requirement by following code: 

 

CREATE EXTENSION odbc_fdw; 

 

CREATE SERVER sql_server_odbc 

FOREIGN DATA WRAPPER odbc_fdw 

OPTIONS (dsn 'SqlConnect'); 

 

 

CREATE FOREIGN TABLE USER_LOCATION_PERMISSION_ODBC ( 

     id bigint NOT NULL, 

    locationsfilter_id bigint NOT NULL, 

    user_id bigint NOT NULL 

SERVER sql_server_odbc 

OPTIONS (schema_name 'dbo', table_name 'USER_LOCATION_PERMISSION'); 

 

CREATE USER MAPPING FOR postgres 

SERVER sql_server_odbc 

 

But while executing below statement,  

SELECT * FROM USER_LOCATION_PERMISSION_ODBC 

 

We will get the following error: 

ERROR: Connecting to driver SQL state: 58000 

  

Please suggest me why this error was occurred. 

 

Regards, 

Soumya Ghosh 

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: [PoC] pg_upgrade: allow to upgrade publisher node
Next
From: Jean-Christophe Arnu
Date:
Subject: Re: FDW pushdown of non-collated functions