Re: Function args: TEXT -vs- VARCHAR?
От | Sergey Konoplev |
---|---|
Тема | Re: Function args: TEXT -vs- VARCHAR? |
Дата | |
Msg-id | CAL_0b1uY+gX-z6Pkpeoxd87k+eeONVKU4A4NC4Z56+Jr1TkAWg@mail.gmail.com обсуждение исходный текст |
Ответ на | Function args: TEXT -vs- VARCHAR? (skinner@britvault.co.uk (Craig R. Skinner)) |
Ответы |
Re: Function args: TEXT -vs- VARCHAR?
|
Список | 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?
There is a good article about this http://www.depesz.com/2010/03/02/charx-vs-varcharx-vs-varchar-vs-text/.
--
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 по дате отправления: