Hi,
my code below:
CREATE OR REPLACE FUNCTION dchoma.connection_test( ) RETURNS text AS
$$
import psycopg2
try:
conn = psycopg2.connect("dbname='database_name' user='user'
host='remote_host' password='pass' port=5432")
return "Connection successful "
except Exception , msg :
return "Exception: {m}".format(m=msg)
$$
LANGUAGE 'plpythonu' VOLATILE;
select * from dchoma.connection_test();
HAWQ version 2.0.1.0 build dev ( compiled from github)
Remote database version: PostgreSQL 9.2.15 on x86_64-redhat-linux-gnu,
compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit
OS: CentOS 7-1511
i found similar issiue here, but the problem is not solved.
https://discuss.zendesk.com/hc/en-us/community/posts/200793368-greenplum-dblink-postgresql-remote-is-error
Thanks
Dominik
2016-08-05 2:23 GMT+02:00 Lei Chang <[email protected]>:
>
> Hi Dominik,
>
> Can you shared your code for us to reproduce the issue?
>
> Thanks
> Lei
>
>
> On Thu, Aug 4, 2016 at 10:11 PM, Dominik Choma <[email protected]>
> wrote:
>
>> Hi All,
>>
>> For one use case I want to connect to external postgreSQL database from
>> HAWQ PL/Python procedure.
>> I use python psycopg2 library.
>> Remote postgreSQL server reject connecion from HAWQ with
>> this error : FATAL unsupported frontend protocol 28675.0: server
>> supports 1.0 to 3.0.
>> The same python code is running well from OS level.
>>
>> I wonder if it is HAWQ or PostgreSQL PL/Python interpreter related
>> issiue.
>> Any help or pointers would be great.
>>
>> Dominik
>>
>
>