Function args: TEXT -vs- VARCHAR? - Mailing list pgsql-sql

From skinner@britvault.co.uk (Craig R. Skinner)
Subject Function args: TEXT -vs- VARCHAR?
Date
Msg-id 20131112181744.GA7522@teak.britvault.co.uk
Whole thread Raw
Responses Re: Function args: TEXT -vs- VARCHAR?  (Luca Vernini <lucazeo@gmail.com>)
Re: Function args: TEXT -vs- VARCHAR?  (Sergey Konoplev <gray.ru@gmail.com>)
List pgsql-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



pgsql-sql by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: Find datatype of a column during the backend flow
Next
From: Luca Vernini
Date:
Subject: Re: Function args: TEXT -vs- VARCHAR?