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

From Sergey Konoplev
Subject Re: Function args: TEXT -vs- VARCHAR?
Date
Msg-id CAL_0b1uY+gX-z6Pkpeoxd87k+eeONVKU4A4NC4Z56+Jr1TkAWg@mail.gmail.com
Whole thread Raw
In response to Function args: TEXT -vs- VARCHAR?  (skinner@britvault.co.uk (Craig R. Skinner))
Responses Re: Function args: TEXT -vs- VARCHAR?  (skinner@britvault.co.uk (Craig R. Skinner))
List pgsql-sql


On Tuesday, November 12, 2013, Craig R. Skinner wrote:
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


--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com

pgsql-sql by date:

Previous
From: Luca Vernini
Date:
Subject: Re: Function args: TEXT -vs- VARCHAR?
Next
From: skinner@britvault.co.uk (Craig R. Skinner)
Date:
Subject: Re: Function args: TEXT -vs- VARCHAR?