Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgIXB-0000Nx-HR for pgsql-sql@arkaria.postgresql.org; Tue, 12 Nov 2013 18:17:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VgIXB-0004fM-1Z for pgsql-sql@arkaria.postgresql.org; Tue, 12 Nov 2013 18:17:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgIXA-0004fF-0D for pgsql-sql@postgresql.org; Tue, 12 Nov 2013 18:17:52 +0000 Received: from teak.britvault.co.uk ([78.33.153.148]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgIX5-0007y3-1K for pgsql-sql@postgresql.org; Tue, 12 Nov 2013 18:17:50 +0000 Received: by teak.britvault.co.uk (Postfix, from userid 1970) id 3dJxyJ6ZlpzBBY; Tue, 12 Nov 2013 18:17:44 +0000 (GMT) Date: Tue, 12 Nov 2013 18:17:44 +0000 To: pgsql-sql@postgresql.org Subject: Function args: TEXT -vs- VARCHAR? Message-ID: <20131112181744.GA7522@teak.britvault.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) From: skinner@britvault.co.uk (Craig R. Skinner) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org When writing (9.2) PostgreSQL functions, is it preferable to have text or character varying args? The tables the functions are updating/inserting into have character varying columns. I've used both in various places & want to unify. Using character varying with an over length arg causes the function to bomb out on calling, which seems the logical thing to do as the table can't accept the data anyway. Thoughts? -- Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql