Re: varchar vs. text - Mailing list pgsql-general

From Michael Garriss
Subject Re: varchar vs. text
Date
Msg-id 3F69366B.6080902@earthlink.net
Whole thread Raw
In response to Re: varchar vs. text  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

>Michael Garriss <mgarriss@earthlink.net> writes:
>
>
>>I curious about the benefits of a varchar over text.
>>
>>
>
>1. Compliance to the letter of the SQL spec.
>2. Ability to define a maximum length, if you happen to feel the need to
>   impose a specific maximum length.  (If you don't have a good reason
>   to impose any particular max length, this is a minus not a plus,
>   because the spec says you have to pick one anyway.)
>
>
>
>>Is it speed,
>>
>>
>
>It's a loser on speed because of the extra cycles spent to check the
>max length.  Other than those cycles, there is no difference.
>
>            regards, tom lane
>
>
>
Thanks for the quick response.

Michael

P.S.  The code I'm writing is going to be ported to MySQL by a friend.
Do you have any idea if TEXT is supported over there?


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: varchar vs. text
Next
From: Pavel Stehule
Date:
Subject: Re: Where are PL/pgSQL functions stored?