createlang
Hello
Im trying to load plpgsql into my test db... Im wondering if theres a
way to check if its loaded... I do:
test-# createlang plpgsql test
test-#
When i try load an example function:
test-# \i test.sql
Im getting:
psql:test.sql:5: ERROR: language "plpgsql" does not exist
HINT: You need to use "createlang" to load the language into the
database.
Anyone any hints for me?
Thanks
Eoghan
eoghan wrote:
Hello
Im trying to load plpgsql into my test db... Im wondering if theres a
way to check if its loaded... I do:
test-# createlang plpgsql test
createlang is a command line client:
bash# createlang -U postgres -P 5432 plpgsql database
What you are looking for is:
CREATE LANGUAGE.
Sincerely,
Joshua D. Drake
--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Exit the psql prompt. Type the same command:
createlang plpgsql test
Then access your db:
psql test
And load your script:
\i test.sql
On Aug 15, 2005, at 4:45 PM, eoghan wrote:
Hello
Im trying to load plpgsql into my test db... Im wondering if theres a
way to check if its loaded... I do:
test-# createlang plpgsql test
test-#
When i try load an example function:
test-# \i test.sql
Im getting:
psql:test.sql:5: ERROR: language "plpgsql" does not exist
HINT: You need to use "createlang" to load the language into the
database.
Anyone any hints for me?
Thanks
Eoghan---------------------------(end of
broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
-----
James Cradock, jcradock@me3.com
Almost forgot:
http://www.postgresql.org/docs/8.0/interactive/app-createlang.html
I hope this and the prior reply help.
On Aug 15, 2005, at 4:45 PM, eoghan wrote:
Hello
Im trying to load plpgsql into my test db... Im wondering if theres a
way to check if its loaded... I do:
test-# createlang plpgsql test
test-#
When i try load an example function:
test-# \i test.sql
Im getting:
psql:test.sql:5: ERROR: language "plpgsql" does not exist
HINT: You need to use "createlang" to load the language into the
database.
Anyone any hints for me?
Thanks
Eoghan---------------------------(end of
broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
-----
James Cradock, jcradock@me3.com
me3 Technology Consultants, LLC
24 Preble Street, 2nd Floor
Portland, ME 04101
207-772-3217 (office)
207-838-8678 (mobile)
www.me3.com
On 15 Aug 2005, at 21:58, Joshua D. Drake wrote:
eoghan wrote:
Hello
Im trying to load plpgsql into my test db... Im wondering if
theres a way to check if its loaded... I do:
test-# createlang plpgsql testcreatelang is a command line client:
bash# createlang -U postgres -P 5432 plpgsql database
What you are looking for is:
CREATE LANGUAGE.
Thanks Joshua,
I was using createlang from the command line...
eoghan-js-Computer:~ postgres$ /opt/local/bin/psql test -U postgres
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.
<etc>
test=# createlang plpgsql test
Or if loading .sql do you need the CREATE LANGUAGE in here?
Im new to this...
Thanks for you help
Eoghan
On 8/15/05 4:45 PM, "eoghan" <postgres@redry.net> wrote:
Hello
Im trying to load plpgsql into my test db... Im wondering if theres a
way to check if its loaded... I do:
test-# createlang plpgsql test
test-#
When i try load an example function:
test-# \i test.sql
Im getting:
psql:test.sql:5: ERROR: language "plpgsql" does not exist
HINT: You need to use "createlang" to load the language into the
database.
You need to run creatlang from the command line (outside the database).
Here is the documentation:
http://www.postgresql.org/docs/8.0/interactive/app-createlang.html
Sean
On 15 Aug 2005, at 22:03, James Cradock wrote:
Almost forgot:
http://www.postgresql.org/docs/8.0/interactive/app-createlang.html
I hope this and the prior reply help.
On Aug 15, 2005, at 4:45 PM, eoghan wrote:
Hi James
Thanks! That got it...
Exit psql prompt and ran createlang...
Suppose seems obvious to me now :)
Thanks again
Eoghan