Hi, We are trying to make use of module ODBC-link. We follow the instructions as read in README.TXT, including the given examples. Connecting to an external Oracle database is successful: = oratest=# select odbclink.connect('ONT_KIS', 'sbm_beheer', 'password'); = connect = --------- = 1 = (1 row)
Then we try to select some data: = oratest=# select odbclink.query(1, 'SELECT * FROM mytable') as result(id int4, t text, d decimal); = ERROR: syntax error at or near "(" = LINE 1: ...bclink.query(1, 'SELECT * FROM mytable') as result(id int4, ... = ^ For some reason "as result(" generates the error. ODBC-link README.TXT reads: = All three forms of the function odbclink.query() returns "SETOF RECORD", so = 1. it can return different query results = 2. it must be properly casted to the expected result structure The ODBC connection seems to work, when I select without using the "as result"-part, I get another error message. = oratest=# select odbclink.query(1, 'SELECT * FROM mytable'); = ERROR: function returning record called in context that cannot accept type record So it seems the functions returns data, but I do not know how to display it. Since I do not understand how to handle SETOF RECORD I can not solve the problem myself. We're running PostgreSQL 8.4.3, ODBC-link 1.0. Any help will be highly appreciated. TIA, Harrie Rodenbach -- -- Met vriendelijke groet / with kind regards, Harrie Rodenbach -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql