Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #438

Re: Execute a function from another database

From "Stefan Wirrer" <news@volke-muc.de>
Newsgroups comp.databases.postgresql
Subject Re: Execute a function from another database
Date 2013-02-20 13:01 +0100
Organization (posted via) M-net Telekommunikations GmbH
Message-ID <kg2dvc$sfo$1@news.m-online.net> (permalink)
References <kg259u$usu$1@news.m-online.net>

Show all headers | View raw


Stefan Wirrer schreibselte:
> Hi,
>
> how can I execute a function from another database?
>
> SELECT * FROM dblink('dbname=mydb user=myself password=pw',
>   'SELECT fc_b_zone(12, 4711)') ;
>
> ERROR: a column definition list is required for functions returning
> "record"

solution:
SELECT * FROM dblink('dbname=mydb user=myself password=pw',
'SELECT fc_b_zone(12, 4711)') AS r(result boolean) 

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Execute a function from another database "Stefan Wirrer" <news@volke-muc.de> - 2013-02-20 10:33 +0100
  Re: Execute a function from another database "Stefan Wirrer" <news@volke-muc.de> - 2013-02-20 13:01 +0100

csiph-web