Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A6FC01337B6E for ; Mon, 9 May 2011 08:42:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 27984-05 for ; Mon, 9 May 2011 11:41:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hermes.ort.edu.uy (hermes.ort.edu.uy [164.73.96.24]) by mail.postgresql.org (Postfix) with ESMTP id 6FC941337B49 for ; Mon, 9 May 2011 08:41:49 -0300 (ADT) Received: from hermes.ort.edu.uy (localhost [127.0.0.1]) by localhost.ort.edu.uy (Postfix) with ESMTP id 39AEF135AC4 for ; Mon, 9 May 2011 08:41:44 -0300 (UYT) Received: from archie.ort.edu.uy (archie.ort.edu.uy [192.168.20.22]) by hermes.ort.edu.uy (Postfix) with ESMTP id 2D175135AC2 for ; Mon, 9 May 2011 08:41:44 -0300 (UYT) Received: from [172.30.10.6] (unknown [172.30.10.6]) by archie.ort.edu.uy (Postfix) with ESMTP id DEF371FA55 for ; Mon, 9 May 2011 08:41:43 -0300 (UYT) Message-ID: <4DC7D1D5.5070306@ort.edu.uy> Date: Mon, 09 May 2011 08:36:53 -0300 From: Rodriguez Fernando User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: column check mistake or not? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-Product-Ver: IMSS-7.0.0.3346-6.5.0.1024-18124.007 X-TM-AS-User-Approved-Sender: Yes;Yes X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/49 X-Sequence-Number: 30188 Yesterday i did a mistake executing one query, i use a column daes not exists in the table the result was all rows of the table. Platform Fedora 14 32 bits Version Postgresql 9.0.2 The column id_documento not exists in t_log_modificar_deuda, this behavior is correct or not? query select * from t_documento where (importe_deudor_documento > importe_documento) or id_documento in (select id_documento from t_log_modificar_deuda); result all column of t_documento. schema CREATE TABLE t_documento ( id_documento d_codigo NOT NULL, nro_documento d_codigo NOT NULL, importe_documento d_importe, id_cliente d_codigo, id_razon_social d_codigo, fecha_documento d_fecha NOT NULL, usuario_ingreso d_usuario_ingreso, fecha_ingreso d_fecha_ingreso, hora_ingreso d_hora_ingreso, id_tipo_documento d_codigo, fecha_vencimiento_documento d_fecha, id_moneda d_codigo, id_sucursal d_codigo, motivo_anulacion_documento d_descripcion, fecha_anulacion_documento d_fecha, hora_anulacion_documento d_hora, usuario_anulacion_documento d_nombre, sistema_viejo_documento d_boolean DEFAULT 'N'::bpchar NOT NULL, redondeo_documento d_importe DEFAULT 0 NOT NULL, importe_deudor_documento d_importe DEFAULT 0 NOT NULL, id_categoria_documento d_codigo NOT NULL, fecha_exportado_memory_documento d_fechahora, aniomes_exportado_gestoria_documento integer, importe_deudor_documento_ant d_importe, modificado integer DEFAULT 0, anulacion_exportado_memory_documento d_fechahora ); ALTER TABLE ONLY t_documento ADD CONSTRAINT documento_primary PRIMARY KEY (id_documento); ALTER TABLE ONLY t_documento ADD CONSTRAINT nro_documento_unico UNIQUE (nro_documento); CREATE TABLE t_log_modificar_deuda ( nro_documento d_codigo NOT NULL, importe_actual d_importe NOT NULL, importe_sugerido d_importe NOT NULL, usuario_ingreso d_usuario_ingreso, fecha_ingreso d_fecha_ingreso, hora_ingreso d_hora_ingreso );