X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1C39D474E42 for ; Fri, 14 Feb 2003 04:11:44 -0500 (EST) Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [193.162.153.2]) by postgresql.org (Postfix) with ESMTP id 1860D475A37 for ; Fri, 14 Feb 2003 04:11:43 -0500 (EST) Received: from johnny (0x50c49adc.adsl-fixed.tele.dk [80.196.154.220]) by pfepa.post.tele.dk (Postfix) with SMTP id D8FB84802E6; Fri, 14 Feb 2003 10:09:07 +0100 (CET) Message-ID: <005a01c2d409$39f6b960$dc9ac450@johnny> From: "Johnny Kristensen" To: "Josh Berkus" Cc: References: <000801c2d2e0$edd32420$dc9ac450@johnny> <200302130902.05987.josh@agliodbs.com> Subject: Re: SQL Functions vs PL/PgSQL Date: Fri, 14 Feb 2003 10:12:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/335 X-Sequence-Number: 11734 Of course what I meant was if postgres stores execution plans for queries i= n user-defined SQL functions. From the docs I can see that PL/PgSQL uses th= e SPI-interface to create and store execution plans for queries for each co= nnection. But I'll use the PREPARE function like Thomasz Myrta suggested. /Johnny ----- Original Message -----=20 From: "Josh Berkus" To: "Johnny Kristensen" ; Sent: Thursday, February 13, 2003 6:02 PM Subject: Re: [SQL] SQL Functions vs PL/PgSQL Johnny, > Does postgres store execution plan's for user-defined SQL functions as the > PL/pgSQL interpreter does. And if so - will this only be prepared after an > initial call to the function? Can't seem to find this information in the > docs!? Thanks, Unless you know something I don't, I do not believe that PL/pgSQL stores=20 execution plans for functions. --=20 Josh Berkus Aglio Database Solutions San Francisco ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)