Re: Junk queries with variables?

From: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Junk queries with variables?
Date: 2005-02-25 08:33:32
Message-ID: ED4E30DD9C43D5118DFB00508BBBA76EB165EC@neptun.sonorys.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

PL/pgSQL is not part of template1 = if you create a new database.
Thus you can use for functions just pure SQL or C. To get pgSQL I did that:

CREATE OR REPLACE FUNCTION plpgsql_call_handler()
RETURNS language_handler AS
'$libdir/plpgsql', 'plpgsql_call_handler'
LANGUAGE 'c' VOLATILE;

CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler;

C:\> -----Original Message-----
C:\> From: Steve - DND [mailto:postgres(at)digitalnothing(dot)com]
C:\> Sent: Donnerstag, 24. Februar 2005 18:41
C:\> To: KÖPFERL Robert; pgsql-sql(at)postgresql(dot)org
C:\> Subject: RE: Junk queries with variables?
C:\>
C:\>
C:\> >
C:\> > In pgadmins SQL-window SQL is the 'language' of choice. Or it is
C:\> > rather the
C:\> > only language. Thus if you intend to program plTk or
C:\> PL/pgSQL, there's no
C:\> > way around defining a function.
C:\> >
C:\> > (At first you have to define a new language in your schema)
C:\>
C:\> I'm a little confused, is there no way around this, or are
C:\> you saying I need
C:\> to use CREATE LANGUAGE to define a new language to use?
C:\> Currently the only
C:\> language I have for the DB is plpgsql.
C:\>
C:\> Thanks,
C:\> Steve
C:\>
C:\>

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Schäfer 2005-02-25 09:41:03 Are SQL queries locale dependent?
Previous Message Bruce Momjian 2005-02-25 00:49:11 Re: PostgreSQL ignores my indexes