Re: Running a PL/pgSQL function

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Christophe <xof(at)thebuild(dot)com>
Subject: Re: Running a PL/pgSQL function
Date: 2008-08-12 00:03:55
Message-ID: 200808111703.55596.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 11 August 2008 4:24:17 pm Christophe wrote:
> I'm startled that I've never done this before, but... I have a PL/
> pgSQL function that takes no arguments, returns VOID, and has a bunch
> of side effects on the database. The correct way of invoking this
> function is:
>
> SELECT my_func();
>
> ... yes? Thanks; it seems to work fine, but using SELECT here is
> causing some part of my brain to scream "counter-intuitive."

Similar to doing:

test=# SELECT 1+1;
?column?
----------
2
(1 row)

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-08-12 01:43:05 Re: Running a PL/pgSQL function
Previous Message Klint Gore 2008-08-11 23:33:52 Re: Can I search for text in a function?