Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 72BA7632B0E for ; Thu, 27 May 2010 11:05:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 05982-07 for ; Thu, 27 May 2010 14:05:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 51D6363222E for ; Thu, 27 May 2010 11:05:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o4RE5gSv014478; Thu, 27 May 2010 10:05:42 -0400 (EDT) To: Harrie Rodenbach cc: pgsql-sql@postgresql.org Subject: Re: Do not understand "SETOF RECORD" - therefore can not use ODBC-link In-reply-to: References: Comments: In-reply-to Harrie Rodenbach message dated "Thu, 27 May 2010 10:23:03 +0200" Date: Thu, 27 May 2010 10:05:42 -0400 Message-ID: <14477.1274969142@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/130 X-Sequence-Number: 34178 Harrie Rodenbach writes: > = 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, ... You need that to be select * from odbclink.query ... the "as" business is only allowed in FROM clause. regards, tom lane