Re: PL/pgSQL examples NOT involving functions

Поиск
Список
Период
Сортировка
Искать
От
Тема
Re: PL/pgSQL examples NOT involving functions
Дата
Msg-id
200111280034.09d3@lh00.opsion.fr
Список
Дерево обсуждения
PL/pgSQL examples NOT involving functions Roland Roberts <roland@astrofoto.org>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: [DOCS] PL/pgSQL examples NOT involving functions "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: PL/pgSQL examples NOT involving functions Roland Roberts <roland@astrofoto.org>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions Roland Roberts <roland@astrofoto.org>
Re: PL/pgSQL examples NOT involving functions "Andrew G. Hammond" <drew@xyzzy.dhs.org>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions "Josh Berkus" <josh@agliodbs.com>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions "Josh Berkus" <josh@agliodbs.com>
Re: PL/pgSQL examples NOT involving functions Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: PL/pgSQL examples NOT involving functions Jan Wieck <janwieck@yahoo.com>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: PL/pgSQL examples NOT involving functions Jan Wieck <janwieck@yahoo.com>
Re: PL/pgSQL examples NOT involving functions "Josh Berkus" <josh@agliodbs.com>
Re: PL/pgSQL examples NOT involving functions Roland Roberts <roland@astrofoto.org>
Cross-posting (was Re: PL/pgSQL examples NOT involving functions) Tom Lane <tgl@sss.pgh.pa.us>
Re: PL/pgSQL examples NOT involving functions "Josh Berkus" <josh@agliodbs.com>
Re: PL/pgSQL examples NOT involving functions Roland Roberts <roland@astrofoto.org>
Hello!

> envisity=# create table temp (tempid integer);
> CREATE
> envisity=# INSERT INTO temp VALUES(1);
> 
> CREATE FUNCTION test3() RETURNS INTEGER AS 'DECLARE
id INTEGER; BEGIN SELECT INTO id tempid FROM temp
LIMIT 1; RETURN id; END;' LANGUAGE 'plpgsql';
> DROP
> CREATE
> envisity=# select test3();
>  test3
> -------
>      1
> (1 row)
> 
> envisity=# DROP TABLE temp ;
> DROP
> envisity=# create table temp (tempid integer);
> CREATE
> envisity=# INSERT INTO temp VALUES(3);
> INSERT 150371 1
> envisity=# select test3();
> ERROR:  Relation 150348 does not exist

If I exit plpgsql and reenter, then "select test3()"
works again. So I guess "the first time" in

"The PL/pgSQL call handler parses the function's
source text and produces an internal binary
instruction tree the first time the function is
called."

might be referring to "for each client connection".

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com






В списке pgsql-sql по дате отправления
От: Josh Berkus
Дата:
Сообщение: Re: Complex query help please
От: Roberto Mello
Дата:
Сообщение: Re: hu.po
FAQ