agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: skinner@britvault.co.uk
To: pgsql-sql@postgresql.org
Subject: Function args: TEXT -vs- VARCHAR?
Date: Tue, 12 Nov 2013 18:17:44 +0000
Message-ID: <20131112181744.GA7522@teak.britvault.co.uk> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

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



view thread (17+ messages)  latest in thread

Message-ID: <20131112181744.GA7522@teak.britvault.co.uk>
Permalink:  ../20131112181744.GA7522@teak.britvault.co.uk/
Also on:    postgresql.org/message-id/20131112181744.GA7522@teak.britvault.co.uk

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: skinner@britvault.co.uk
  Subject: Re: Function args: TEXT -vs- VARCHAR?
  In-Reply-To: <20131112181744.GA7522@teak.britvault.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox