From: Andreas Tille <tillea@rki.de>
Cc: PostgreSQL SQL <pgsql-sql@hub.org>
Subject: Re: Argument variables for select
Date: Mon, 28 Aug 2000 11:53:17 +0200 (CEST)
Message-ID: <Pine.LNX.4.21.0008281138430.31734-100000@wr-linux02.rki.de> (raw)
In-Reply-To: <39AA2F1C.2CCE9860@vpcit.ru>
On Mon, 28 Aug 2000, Yury Don wrote:
> Andreas Tille wrote:
> >
> > Create Function VarSelect ( varchar, varchar )
> > returns int
> > As '
> > Declare num int ;
> >
> > Begin
> > Select Into num Count(*) From $1 Where $2 ;
> > return num;
> > End ;
> > ' language 'plpgsql' ;
> >
> AFAIK it's impossible with plpgsql, but it's possible in pltcl.
Hmmm, I wonder how many languages I will learn while dealing with
PostgreSQL. What about performance of pltcl compared to C.
I wonder if I just do all my work using C-functions, because I
know C very well and don't want to reach the next limit which
I will possibly face when using pltcl.
I would really like to write all my functions in SQL or PLPGSQL.
If this is really impossible (I just wonder if the construct above
could really not be implemented???), I would prefer C over other
languages, if there are no real drawbacks.
Kind regards
Andreas.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tillea@rki.de, pgsql-sql@hub.org
Subject: Re: Argument variables for select
In-Reply-To: <Pine.LNX.4.21.0008281138430.31734-100000@wr-linux02.rki.de>
References: <39AA2F1C.2CCE9860@vpcit.ru> <Pine.LNX.4.21.0008281138430.31734-100000@wr-linux02.rki.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox