Search Postgresql Archives

Error: "remote query result rowtype does not match the specified FROM clause rowtype," on remote function call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is my remote function:

CREATE OR REPLACE FUNCTION public._test1()

RETURNS record

LANGUAGE plpgsql

AS $function$

DECLARE

rec record;

BEGIN

  select 1,2 into rec;

  return rec;

END $function$;

 

This is my local function call:

SELECT x.a, x.b

FROM dblink('conn_str', 'select public._test1();')

as x(a int ,b int);

 

This is the error thrown:

ERROR: remote query result rowtype does not match the specified FROM clause 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!

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux