Re: A newbie question

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Brian H Mayo <bmayo(at)comcast(dot)net>
Cc: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: A newbie question
Date: 2003-11-19 23:21:43
Message-ID: 1069284103.1379.1.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2003-11-19 at 02:43, Brian H Mayo wrote:
> I am a newbie to PostgreSQL. I added plpgsql to the database and
> wrote a function in the plpgsql language. How do I execute it?
>
> I read all of the manuals but I cannot seem to figure it out. I
> pulled up the pgadmin III SQL and tried different combinations to run
> the function. I tried PERFORM and EXECUTE; no good.

You have done

CREATE FUNCTION myfunction() ... LANGUAGE 'plpgsql';

Now you can say

SELECT myfunction() FROM mytable;

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"To show forth thy lovingkindness in the morning, and
thy faithfulness every night." Psalms 92:2

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-11-19 23:26:40 Re: SuSE RPMs available for PostgreSQL 7.4
Previous Message Josué Maldonado 2003-11-19 23:20:43 Re: Tunning postgresql