Received: from sivka.carrier.kiev.ua (sivka.carrier.kiev.ua [193.193.193.101]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAHGars51556 for ; Fri, 17 Nov 2000 11:36:54 -0500 (EST) (envelope-from evpopkov@carrier.kiev.ua) Received: from planka.carrier.kiev.ua (root@users.lucky.net [193.193.193.106]) by sivka.carrier.kiev.ua (8/Kilkenny_is_better) with ESMTP id SNO52499 for ; Fri, 17 Nov 2000 18:35:13 +0200 (EET) (envelope-from evpopkov@carrier.kiev.ua) Received: from ed.ed (ln2-105.users.lucky.net [193.193.199.105]) by planka.carrier.kiev.ua (8) with ESMTP id SNN25579 for ; Fri, 17 Nov 2000 18:35:11 +0200 (EET) (envelope-from evpopkov@carrier.kiev.ua) Received: (from root@localhost) by ed.ed (8.8.7/8.8.5) id QAA03053 for pgsql-sql@postgresql.org; Fri, 17 Nov 2000 16:17:20 GMT From: KuroiNeko Date: Fri, 17 Nov 2000 16:17:20 +0000 To: pgsql-sql@postgresql.org Subject: Re: Re: Requests for Development Message-ID: <3A155A10.nail2CB11FQLK@ed.ed> References: <200011151020.FAA01573@jupiter.jw.home> User-Agent: nail 9.14 2000-06-26 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200011/136 X-Sequence-Number: 167 > PL/pgSQL parses the entire function body at first call (per > backend). But the SPI querystrings for all the statements > aren't parsed at that time. It uses SPI_prepare() only for > expressions and queries that actually get executed, so that a > huge function that is called only once in a backend, erroring > out at the first IF, will not parse most of it's queries. > This is surely a win for performance, but it makes it > difficult to develop. Thanks for the explanation. Although, I can't see how this improves performance, I'll keep this in my mind when designing PL/PGSQL SPs. -- Sniper's rifle is an extension of his eye. He kills with his injurious vision. JM