From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | lucamarletta <info(at)beopen(dot)it> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Postgresql c function returning one row with 2 fileds |
Date: | 2013-11-12 14:34:46 |
Message-ID: | CA+Tgmob-oFgDyzRLJf+mfeBk68gyufDeY6LKFNjPxRe51C5esA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Nov 9, 2013 at 5:52 AM, lucamarletta <info(at)beopen(dot)it> wrote:
> I'm new in postgresql c function and I start following examples.
>
> I want to write a simple function that have inside an SQL and passing
> parameter evaluete anbd return 2 fields as sum (for now to be simpler).
>
> The function below has problem passing the check
>
> (get_call_result_type(fcinfo, &resultTypeId, &resultTupleDesc) !=
> TYPEFUNC_COMPOSITE)
This is checking whether the CREATE FUNCTION statement that you use to
invoke this code is set up to return a composite type; it's
essentially cross-checking your C with your SQL.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-11-12 14:35:21 | Re: Row-security writer-side checks proposal |
Previous Message | Stephen Frost | 2013-11-12 14:33:51 | Re: Clang 3.3 Analyzer Results |