FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » pgsql and exception
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: pgsql and exception [message #178136 is a reply to message #178133] Mon, 14 May 2012 19:48 Go to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 14-05-2012 20:46, Une BĂ©vue wrote:
> On 14/05/12 17:19, Shake wrote:
>> Links, You mean URL? have no limit. It don't need to be longs, but it
>> can. There is any requirement of use a "small" varchar(256) for this
>> field?
>>
>> IF there is no limitation or requirement, perhaps is better to put
>> enough space to avoid problems. varchar(1024) could no make a big
>> diference if you don't have a really enormous amount of data.
>
> Yes I mean url for link, a simple google maps URL gave me strlen($url) =
> 329
>
> I have to be more generous...

not too generous ;)
http://dev.mysql.com/doc/refman/5.5/en/char.html
"In contrast to CHAR, VARCHAR values are stored as a one-byte or
two-byte length prefix plus data. The length prefix indicates the number
of bytes in the value. A column uses one length byte if values require
no more than 255 bytes, two length bytes if values may require more than
255 bytes. "

Changing the length from 256 to 1024, or even 2048, should only make a
difference if you store a lot of those lengthy urls...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:
Next Topic: Re: reading a newline from a properties file
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:35:08 GMT 2024

Total time taken to generate the page: 0.05001 seconds