Re: [GENERAL] help with "plpgsql"

2008-04-23 Thread A. Kretschmer
am Mon, dem 21.04.2008, um 17:46:49 +0200 mailte Pau Marc Munoz Torres folgendes: > Hi everybody > > I trying to upload some plpsql functions to postgresql database using a perl > script and i get the following error > > > psql:/usr/local/Make2D-DB_II/pgsql/make2db_functions.pgsql:85: ERROR:

Re: [GENERAL] help with "plpgsql"

2008-04-21 Thread Shane Ambler
Pau Marc Munoz Torres wrote: Hi everybody I trying to upload some plpsql functions to postgresql database using a perl script and i get the following error psql:/usr/local/Make2D-DB_II /pgsql/make2db_functions.pgsql:85: ERROR: language "plpgsql" does not exist HINT: Use CREATE LANGUAGE to l

Re: [GENERAL] help with "plpgsql"

2008-04-21 Thread Christophe
On Apr 21, 2008, at 8:51 AM, Pau Marc Munoz Torres wrote: psql:/usr/local/Make2D-DB_II /pgsql/make2db_functions.pgsql:85: ERROR: language "plpgsql" does not exist HINT: Use CREATE LANGUAGE to load the language into the database. and then when I try to create the language, i get geldb=# C

Re: [GENERAL] help with "plpgsql"

2008-04-21 Thread Craig Ringer
Pau Marc Munoz Torres wrote: ERROR: language "plpgsql" already exists anybody knows what's wrong? Is there any chance you might be connecting to a different database with the perl script and with psql? Procedural languages must be installed into a particular database. -- Craig Ringer --

Re: [GENERAL] help with "plpgsql"

2008-04-21 Thread Pau Marc Munoz Torres
Hi everybody I trying to upload some plpsql functions to postgresql database using a perl script and i get the following error psql:/usr/local/Make2D-DB_II /pgsql/make2db_functions.pgsql:85: ERROR: language "plpgsql" does not exist HINT: Use CREATE LANGUAGE to load the language into the datab

Re: [GENERAL] Help with plpgsql - subst variable value

2006-08-02 Thread Christopher Steffen
*Alexander Bodnar * Try ObjectSeqName TEXT := foobar; EXECUTE 'CREATE SEQUENCE ' || ObjectSeqName || ' start 1 increment 1 maxvalue 2147483647'; Thanks, Chris Steffen ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Heather Johnson
Thank you! That *is* nicer. And thanks to Michael Fuhr too for his reference to the appropriate docs and suggestions. Between your two responses, I have a much better sense of how to go about this and where to look for extra help. Heather Alban Hertroys wrote: Heather Johnson wrote: Hello-- I n

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Alban Hertroys
Heather Johnson wrote: Hello-- I need to make sure that every time a row is inserted into a table called "users" rows are automatically inserted into two other tables: "join_bd" and "behavior_demographics". The inserts on join_bd and behavior_demographics need to create rows that are keyed to th

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-16 Thread Michael Fuhr
On Wed, Mar 16, 2005 at 02:34:48PM -0500, Heather Johnson wrote: > CREATE FUNCTION insert_bd_join_bd (integer) RETURNS opaque AS ' What version of PostgreSQL are you using? The "opaque" type has been deprecated since 7.3; recent versions should use "trigger". And trigger functions aren't declare