Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 83BBA632266 for ; Fri, 28 May 2010 04:32:49 -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 29078-02 for ; Fri, 28 May 2010 07:32:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 2CC4262D9D2 for ; Fri, 28 May 2010 04:32:42 -0300 (ADT) Received: by wwb34 with SMTP id 34so617922wwb.19 for ; Fri, 28 May 2010 00:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=6/k1P+tPqL9FbMg1n666/yg0xMON68OLjGqk/W7lA9Y=; b=F+vs7lKElYMdf72qO0850LeUmBiAH6jiHJ/PwcanI6ZFfbcq76Zjwj7W1Rp81A+qOI P/dMBqtZd/R4MSYmWDwZTECanTuIsE7t7uXXMxBTZzmDGuEn7pMcYKLKp8oQEQeYRerN i0gB7mPtQ1eW3/5WsFvwNJ4WNdA5oe6DOpUn8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hiFiAiDAlh7VBbK/Tlg4tKWYXAP5a2XInMPEZJyZ6OadQ9eK82Mkgulr+HL0aOveix fMaffjz28+T243/z5L6y2/vp4JoEdZpW+807DfUgEew2vOZH1P32ngv/fdGb4+mT+krc BUAeD90+DNTpCbAjOjPjo0J5jU3UTBH43WuL4= MIME-Version: 1.0 Received: by 10.216.188.72 with SMTP id z50mr33505wem.4.1275031960690; Fri, 28 May 2010 00:32:40 -0700 (PDT) Received: by 10.216.188.80 with HTTP; Fri, 28 May 2010 00:32:40 -0700 (PDT) In-Reply-To: <14477.1274969142@sss.pgh.pa.us> References: <14477.1274969142@sss.pgh.pa.us> Date: Fri, 28 May 2010 09:32:40 +0200 Message-ID: Subject: Re: Do not understand "SETOF RECORD" - therefore can not use ODBC-link From: Harrie Rodenbach To: Tom Lane Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201006/8 X-Sequence-Number: 34199 Hi, 2010/5/27 Tom Lane : > Harrie Rodenbach writes: >> =3D =A0oratest=3D# select odbclink.query(1, 'SELECT * FROM mytable') as >> result(id int4, t text, d decimal); =3D =A0ERROR: =A0syntax error at or = near >> "(" =3D =A0LINE 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. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane > That did the trick, thank you Tom. Next problem will be described in a new thread. --=20 Met vriendelijke groet / with kind regards, Harrie Rodenbach