| From: | gonzalo sáenz <gonzalosaenz(at)gmail(dot)com> |
|---|---|
| To: | Máximo Eduardo Méndez <mmendez(at)ceride(dot)gov(dot)ar> |
| Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
| Subject: | Re: Truncado de varchar |
| Date: | 2005-11-08 12:08:44 |
| Message-ID: | 7ae163a40511080408jf7472e2l1c179dc44f429399@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
On 11/7/05, Máximo Eduardo Méndez <mmendez(at)ceride(dot)gov(dot)ar> wrote:
>
> Buenos días. Alguien podría decirme cómo hacer para que en una tabla con
> una columna tipo varchar(n) se pueda insertar una cadena que tenga más de n
> caracteres y que trunque automáticamente los que se exceden (superan ese
> valor n). Ese comportamiento según vi en el manual, era posible en versiones
> anteriors a 7.2. Yo estoy trabajando con la 8.0.3. Muchas gracias.
insert into tu_tabla values tu_columna=substring(tu_string_largo, from 1 for
n) ;
Máximo E. Méndez
> CERIDE
>
> ---------------------------(fin del mensaje)---------------------------
> TIP 4: No hagas 'kill -9' a postmaster
>
--
When things are investigated, then true knowledge is achieved;
when true knowledge is achieved, then the will becomes sincere;
when the will becomes sincere, then the heart sees correctly;
when the heart sees correctly, then the personal life is cultivated;
when the personal life is cultivated, then the family life is regulated;
when the family life is regulated, then the national life is orderly;
and when the national life is orderly, then there is peace in this world.
Confucius
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Guillermo O. Burastero | 2005-11-08 12:42:42 | Re: Actualizar campo |
| Previous Message | Mximo Eduardo Mndez | 2005-11-08 11:48:29 | Re: Truncado de varchar |