X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D6F8DD1B8AD for ; Fri, 29 Aug 2003 15:02:28 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 31432-04 for ; Fri, 29 Aug 2003 12:01:53 -0300 (ADT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by svr1.postgresql.org (Postfix) with ESMTP id D1CA9D1B8B4 for ; Fri, 29 Aug 2003 12:01:52 -0300 (ADT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19skl6-00047E-00 for ; Fri, 29 Aug 2003 11:01:52 -0400 Received: by dba2 (Postfix, from userid 1019) id E0AB8D0C1; Fri, 29 Aug 2003 11:01:51 -0400 (EDT) Date: Fri, 29 Aug 2003 11:01:51 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: PL/pgSQL functions - text / varchar - havy performance Message-ID: <20030829150151.GI19388@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: <200308291554.46748.o.siegmar@vitrado.de> <3F4F6754.8050900@potentialtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4F6754.8050900@potentialtech.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/495 X-Sequence-Number: 3311 On Fri, Aug 29, 2003 at 10:46:44AM -0400, Bill Moran wrote: > > Postgres has to convert the text to a varchar before it can actually > do anything. It's possible (though I'm not sure) that it has to > do the conversion with each record it looks at. It does? According to the docs, varchar is just syntactic sugar for text. In fact, text and varchar() are supposed to be exactly the same. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110