X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 89839D1E9B1 for ; Wed, 31 Mar 2004 12:06:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 83015-03 for ; Wed, 31 Mar 2004 08:06:09 -0400 (AST) Received: from anchor-post-37.mail.demon.net (anchor-post-36.mail.demon.net [194.217.242.86]) by svr1.postgresql.org (Postfix) with ESMTP id 94F2FD1D400 for ; Wed, 31 Mar 2004 08:06:05 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1B8eTw-000EQP-0b; Wed, 31 Mar 2004 13:06:08 +0100 Received: by mainbox.archonet.com (Postfix, from userid 529) id 9FE1716A82; Wed, 31 Mar 2004 13:06:07 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 9C009169F8; Wed, 31 Mar 2004 13:06:05 +0100 (BST) From: Richard Huxton To: Ivan Sergio Borgonovo , pgsql-sql@postgresql.org Subject: Re: plpgsql vs. SQL in stored procedures Date: Wed, 31 Mar 2004 13:06:04 +0100 User-Agent: KMail/1.5 References: <20040331000808.7aaedc33@stige.webthatworks.it> <20040331130756.2cc03a1e@stige.webthatworks.it> In-Reply-To: <20040331130756.2cc03a1e@stige.webthatworks.it> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403311306.04634.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/271 X-Sequence-Number: 17370 On Wednesday 31 March 2004 12:07, Ivan Sergio Borgonovo wrote: > > I was used to do stuff like this with MS SQL > > create proc sp_getuid @uid uniqueidentifier [snip] > Does it mean that to have variables in SP I'll have to use plpgsql > in spite of plain SQL? Yep - just like there you were using transact-sql (if I remember its name correctly) rather than sql. The syntax is different (plpgsql bares a startling resemblance to the Oracle approach), the purpose of each is the same. -- Richard Huxton Archonet Ltd