Re: Is my MySQL Gaining ?

From: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: "B(dot) van Ouwerkerk" <bvo(at)atz(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: Is my MySQL Gaining ?
Date: 2003-12-29 23:52:52
Message-ID: 200312292052.52706.martin@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers

El Lun 29 Dic 2003 20:24, B. van Ouwerkerk escribió:
>
> > > Another example? alright, data types. I found a very helpful list at the
> > > website but I didn't see the limitations per type (maximum lenght like
> > > MySQL says varchar max 255), or is it hidden somewhere on the PG
website?.

I can recall that Informix had a maximun of 255 characters in the varchar,
which was documented, but if I created a table with varchar(350) it would
silently default to 255. Very nasty. :-(

> >??? That is right in the Data Types chapter...
> >
> >http://www.postgresql.org/docs/7.4/static/datatype.html
>
> I still don't find it. I know you can do a varchar(255) but what is the
> maximum PG will allow? Is there a maximum?
> In short, how much can I put into the field before it breaks.

As it says in
http://www.postgresql.org/docs/7.4/static/datatype-character.html:

SQL defines two primary character types: character varying(n) and
character(n), where n is a positive integer. Both of these types can store
strings up to n characters in length.

Does it say that there is a limit? Yes surely there is one, which most likely
will depends on the Processor and OS you are running (64 bit or 32 bit), but
anyway, such log varchars wouldn't be that recommended, and maybe the TEXT
data type would be more suitable.

> But perhaps I should keep my mouth shut until I have been reading a good
> book ;-) still think it should be in the docs though.

You should! :-)

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mmarques(at)unl(dot)edu(dot)ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Dustin Sallings 2003-12-30 00:29:00 Re: [GENERAL] Is my MySQL Gaining ?
Previous Message John Sidney-Woollett 2003-12-29 23:41:22 Re: Is my MySQL Gaining ?

Browse pgsql-general by date

  From Date Subject
Next Message Gavin M. Roy 2003-12-30 00:25:58 PG_Autotune
Previous Message John Sidney-Woollett 2003-12-29 23:41:22 Re: Is my MySQL Gaining ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Dustin Sallings 2003-12-30 00:29:00 Re: [GENERAL] Is my MySQL Gaining ?
Previous Message John Sidney-Woollett 2003-12-29 23:41:22 Re: Is my MySQL Gaining ?