Re: Is my MySQL Gaining ? - Mailing list pgsql-general

From Martin Marques
Subject Re: Is my MySQL Gaining ?
Date
Msg-id 200312292052.52706.martin@bugs.unl.edu.ar
Whole thread Raw
In response to Re: Is my MySQL Gaining ?  ("B. van Ouwerkerk" <bvo@atz.nl>)
Responses Re: Is my MySQL Gaining ?  ("B. van Ouwerkerk" <bvo@atz.nl>)
List pgsql-general
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@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telemática
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------


pgsql-general by date:

Previous
From: "John Sidney-Woollett"
Date:
Subject: Re: Is my MySQL Gaining ?
Next
From: "Gavin M. Roy"
Date:
Subject: PG_Autotune