Re: Error: "remote query result rowtype does not match the specifiedFROM clause rowtype," on remote function call
| От | Adrian Klaver |
|---|---|
| Тема | Re: Error: "remote query result rowtype does not match the specifiedFROM clause rowtype," on remote function call |
| Дата | |
| Msg-id | 1a10f0e7-a098-65b7-c08a-440bfb871166@aklaver.com обсуждение исходный текст |
| Ответ на | Error: "remote query result rowtype does not match the specified FROMclause rowtype," on remote function call (Antonio Gomez <AGomez@EBSCO.COM>) |
| Ответы |
RE: Error: "remote query result rowtype does not match the specifiedFROM clause rowtype," on remote function call
|
| Список | pgsql-general |
On 3/25/19 1:08 PM, Antonio Gomez wrote:
> This is my *remote* function:
>
> CREATEORREPLACE FUNCTIONpublic._test1()
>
> RETURNS record
>
> LANGUAGE plpgsql
>
> AS$function$
>
> DECLARE
>
> rec record;
>
> BEGIN
>
> select1,2intorec;
>
> returnrec;
>
> END$function$;
>
> This is my *local* function call:
>
> SELECTx.a, x.b
>
> FROMdblink('conn_str', 'select public._test1();')
>
> asx(a int ,b int);
Do not have time to spin a test up at the moment, but what happens if
you do?"
SELECT *
FROM dblink('conn_str', 'select public._test1();')
as x(a int ,b int);
>
> This is the error thrown:
>
> ERROR: remote query result rowtype does notmatchthe specified FROMclause
> rowtype
>
> Question:
>
> Since DBLINK requires that I define a schema to place the function's
> return items, how do I make the call to recognize a record type being
> returned by the function.
>
> Thanks!
>
--
Adrian Klaver
adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: