From: | Julie Hunt <jhunt(at)chac(dot)qld(dot)edu(dot)au> |
---|---|
To: | rachel cox <rachel(at)kiwiconsulting(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: creating a function in psql |
Date: | 2000-04-05 05:02:39 |
Message-ID: | 38EAC8EF.7402ED85@chac.qld.edu.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
I've just done the very same thing today and found how to add plpgsql
into the pg_languages.
Firstly I located where plpgsql was on our server.
In that directory there was a file called install which gives
instructions using make file and then adding the language to your
pg_language table.
It also gives instructions on how to add it to the template1 so all
created databases will include the language.
I found that I didn't need to use makefile and was able to just do the
psql dbname <mklang.sql
This was the instruction and location of our plpgsql:-
psql test
</usr/ports/databases/postgresql/work/postgresql-6.5.2/src/pl/plpgsql/src/mklang.sql
Once this is created successfully, then you can write the functions
using plpgsql.
Hope this helps
Regards,
Julie
rachel cox wrote:
> hi,
>
> i'm trying to create a very basic function in psql and i keep getting
> the error:
> QUERY: CREATE FUNCTION add_one () RETURNS int4 AS '
> BEGIN
> RETURN 1 + 1;
> END;
> ' LANGUAGE 'plpgsql';
> ERROR: Unrecognized language specified in a CREATE FUNCTION:
> 'plpgsql'. Recognized languages are sql, C, internal and the created
> procedural languages.
>
> does anyone know how i can get this language to be recognized?
>
> also, this is probably related, i was trying to set the date string
> using
> SET DATESTYLE
>
> and it doesn't seem to know what i'm talking about.
>
> can anyone help??? thanks so much in advance,
>
> rachel
From | Date | Subject | |
---|---|---|---|
Next Message | Julie Hunt | 2000-04-05 05:10:40 | Re: creating a function in psql |
Previous Message | Bruce Bantos | 2000-04-05 03:41:04 | startup / shutdown scripts for *BSD? |