Re: Creating a boolean function

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Creating a boolean function
Дата
Msg-id Pine.BSF.4.21.0109191233410.69032-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Creating a boolean function  (Miguel González <iafmgc@unileon.es>)
Список pgsql-sql
On Wed, 19 Sep 2001, [iso-8859-1] Miguel Gonz�lez wrote:

> I tried
> 
> create function check_loan (text,int,int)
> returns bool
> as
> 'select CAST(typetable AS text) from loans where typetable=$1 and
> code_user=$2 and code_loan=$3;'
> language 'sql';
> 
> 
> But I got that the parser cannot identify the =$ operator and requires me to
> do the proper casting.
> 
> How can I do it? Sorry for the questions, but I am new at creating functions
> and I have to hand in this project tomorrow.

You can probably get away with just putting a space before the arguments,
so '= $1' rather than '=$1'.




В списке pgsql-sql по дате отправления:

Предыдущее
От: Denis Bucher
Дата:
Сообщение: URGENT ! Nouveau virus
Следующее
От: "Jeff Eckermann"
Дата:
Сообщение: Re: Creating a boolean function