Re: [GENERAL] Dblink vs calling a function that returns void

2010-03-30 Thread Tom Lane
Merlin Moncure writes: >> You're overthinking the problem.  Imagine void is just a datatype >> (which it is...)  This should work: > but it isn't! void returning functions may not be queried over the > binary protocol (why?), Probably because we never made a send function for type void. Might b

Re: [GENERAL] Dblink vs calling a function that returns void

2010-03-30 Thread Merlin Moncure
On Mon, Mar 29, 2010 at 12:12 PM, Tom Lane wrote: > Boszormenyi Zoltan writes: >> I need to call a function via dblink that returns a void, i.e. >> technically nothing. > > You're overthinking the problem.  Imagine void is just a datatype > (which it is...)  This should work: but it isn't! void

Re: [GENERAL] Dblink vs calling a function that returns void

2010-03-29 Thread Tom Lane
Boszormenyi Zoltan writes: > I need to call a function via dblink that returns a void, i.e. > technically nothing. You're overthinking the problem. Imagine void is just a datatype (which it is...) This should work: select * from public.dblink('import', 'SELECT import.add_one_word(''word'', tr

[GENERAL] Dblink vs calling a function that returns void

2010-03-29 Thread Boszormenyi Zoltan
Hi, I need to call a function via dblink that returns a void, i.e. technically nothing. =# select public.dblink_exec('import', 'SELECT import.add_one_word(''word'', true)'); ERROR: statement returning results not allowed =# select * from public.dblink('import', 'SELECT import.add_one_word(''wor