Re: Problemas al igualar?...

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Jaime Casanova" <systemguards(at)gmail(dot)com>, "Patricio Cifuentes Ithal" <pcifuentes(at)siigsa(dot)cl>, postgresql-es <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Problemas al igualar?...
Date: 2006-10-03 05:01:06
Message-ID: c2d9e70e0610022201i3eebf9aby9035ca745f30faae@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 10/1/06, Jaime Casanova <systemguards(at)gmail(dot)com> wrote:
> > Jaime Casanova escribió:
> > > On 9/28/06, Patricio Cifuentes Ithal <pcifuentes(at)siigsa(dot)cl> wrote:
> > > >
> > > >
> > > >Hola lista,
> > > >no se si sera un bugs, ya que me causa un poco de ilogica este problema.
> > > >tengo una query de un update el cual es el siguiente
> > > >
> > > >Update usuario SET usuario_num = 1 WHERE usuario_fol = 600001;
> > > >
> > > >bueno el tema del problema no esta dentro del set, si no que en el WHERE el
> > > >campo usuario_fol es un int2, y me da un error de que ese campo es muy
> > > >pequeño para la cifra en la cual estoy igualando, claro el mensaje de error
> > > >es super logico, pero ese error corresponde?.
> > >
> > > que version estas usando?
> > >
> > > en este momento probe con la version 8.2beta1 y eso no ocurre... no
> > > tengo a la mano otras versiones para probar...
> >
>
> ocurre lo mismo en 8.1.4
>
> esto deberia reproducir el bug? quiza estoy haciendo algo mal...
>
> create table t1 (col1 int2, col2 char(2));
> insert into t1 (col1) select generate_series(1, 10)::int2;
> update t1 set col2 = 'bb' where col1 = 600001;
>

probe lo mismo en 8.2beta1, 8.1.4, 8.0.8 y 7.4.13 y en ningun caso
ocurrio el error que mencionan. cada vez que hago un update con un
where que sobrepasa el tipo de dato simplemente afecta 0 tuplas...

test=# \d t1
Table "public.t1"
Column | Type | Modifiers
--------+--------------+-----------
col1 | smallint |
col2 | character(2) |

test=# update t1 set col2 = 'bb' where col1 = 60000001;
UPDATE 0
test=# select version();
version
---------------------------------------------------------------------------------------------
PostgreSQL 7.4.13 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.3.5 (Debian 1:3.3.5-13)
(1 row)

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2006-10-03 05:54:37 Re: Problemas al igualar?...
Previous Message Mario Gonzalez ( mario__ ) 2006-10-03 03:29:14 Re: Traduccion de documentacion