Skip site navigation (1) Skip section navigation (2)

Re: Tuning queries inside a function

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>,pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Tuning queries inside a function
Date: 2005-05-02 18:27:27
Message-ID: 4276710F.8090507@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-general
Mike Nolan wrote:
>>Mike Nolan wrote:
>>
>>>>select * from foo('bar','debug')
>>>
>>>
>>>But how do I do that inside a pl/pgsql function?  'select into' doesn't
>>>seem to work properly.
>>
>>
>>You would have to code it. For example:
>>
>>IF $2 = ''debug'' THEN:
> 
> 
> That part I get, but I cannot seem to get an 'explain select....' to return
> the explain output inside a function.

Oh interesting. Hmmm. Alvaro can you think of a way to execute the 
result into a variable and return it as a notice?

Sincerely,

Joshua D. Drake


> --
> Mike Nolan


-- 
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

In response to

Responses

pgsql-general by date

Next:From: VladDate: 2005-05-02 18:51:30
Subject: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe
Previous:From: Mike NolanDate: 2005-05-02 18:07:07
Subject: Re: Tuning queries inside a function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group