Re: tds_fdw binary column - Mailing list pgsql-general

From Aleš Zelený
Subject Re: tds_fdw binary column
Date
Msg-id CAODqTUbYo+8JC-VyoY3rYtODjs64R=e2U5WhpWWHhABB+WpaaA@mail.gmail.com
Whole thread Raw
In response to Re: tds_fdw binary column  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: tds_fdw binary column  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hello,

my fault, I've forgot to mention that I have only DSN and database user/password credentials with no access to the box with Sybase. trying to reach service vendor support,  but it might take some time and I hoped I've done some mistake on my side...

Kind Regards
Ales Zeleny

st 10. 10. 2018 v 0:08 odesílatel Adrian Klaver <adrian.klaver@aklaver.com> napsal:
On 10/9/18 12:07 PM, Aleš Zelený wrote:
> Hello,
>
> I've an issue with foreign table using tds_fdw from PostgreSQL 10 to
> Sybase ASE 15.7.
>
> The issue is, that primary key, which I have to use for my predicate is
> in Sybase data type binary.
>
> Foreign table maps ID column from Sybase binary to PostgreSQL BYTEA.
>
> Simple select is smooth:
> [local]:5432 postgres@postgres:7650
> =# select branch_id from ase.tds_tbl limit 1;
> NOTICE:  tds_fdw: Query executed correctly
> NOTICE:  tds_fdw: Getting results
> ┌────────────────────┐
> │     branch_id      │
> ├────────────────────┤
> │ \x000246000944242d │
> └────────────────────┘
> (1 row)
>
> Whereas select using the ID fails:
>
> [local]:5432 postgres@postgres:7650
> =# select * from ase. tds_tbl where branch_id =
> E'\\x000246000944242d'::bytea;
> ERROR:  DB-Library error: DB #: 102, DB Msg: General SQL Server error:
> Check messages from the SQL Server, OS #: -1, OS Msg: , Level: 15
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Have you done the above, look at the error log for the server?

> Time: 0.213 ms
>
> Thanks for any hints.


> Kind regards Ales Zeleny


--
Adrian Klaver
adrian.klaver@aklaver.com

pgsql-general by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: SELECT UNION into a text[]
Next
From: Steve Atkins
Date:
Subject: Re: Pg_logical without subscription. Can we log the operations ?