error when having sub statements with fields that do not exist

Поиск
Список
Период
Сортировка
От Jose Manuel
Тема error when having sub statements with fields that do not exist
Дата
Msg-id 21f3fb07-9073-4062-8376-a4b364002116@jmdnominas.com
обсуждение исходный текст
Ответы Re: error when having sub statements with fields that do not exist  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs

I have found an error when having sub statements with fields that do not exist.

The problem is that the worker table of the worker schema does not have any field called id in its definition. If only the statement (SELECT id FROM trabajador.trabajador WHERE idempresa=49) is executed, the error occurs that the id column does not exist. But if this statement is in a substatement (where id in), postgresql does not return an error, nor does it return EOF because the where is wrong, but rather it returns all the records of the personal.persons table (9609 records).

The correct sentence is: SELECT id,nif,nombre,ape1,ape2,sexo,fechanac,nacion,locnac,provnac,nompadre,nommadre,ecivil,nhijos,nifconyuge,tipovia,calle,numero,piso,escalera,letra,codpos,locdom,provdom,tfnfijo,tfnmovil,tfnfax,email,web,entidad,sucursal,digito,cuenta,nafiliacionss,clavecorreo,ntarjeta
FROM personal.personas
WHERE nif in(SELECT idpersona FROM trabajador.trabajador WHERE idempresa=49), which returns 36 records

Regards, and thank you very much

--



Jose Manuel Molina Dorador

Jefe de Sistemas. Dto. I+D, Desarrollo y Diseño Web

JMD Nóminas, S.L.

Horario de Trabajo: 09:00 - 15:00 | 17:00 - 19:00




953 65 19 07
josemanuel@jmdnominas.com
www.jmdnominas.com
C/ Martinez de la Rosa, nº 6 - 1ºA C.P.: 23700 - Linares (Jaén)



Este mensaje ha sido enviado vía Internet. Las Comunicaciones vía Internet no son seguras contra la interceptación o la modificación.
JMD NOMINAS por lo tanto no puede garantizar que este mensaje no ha sido
modificado en el tránsito y no acepta ninguna responsabilidad civil para la
información incluida aquí.

Este mensaje y cualquier archivo transmitido con el son confidenciales (y pueden
estar legalmente privilegiados), con la intención de ser usados únicamente por
el destinatario.

Si usted ha recibido este mensaje por equivocación por favor notifique
al remitente destruya sus copias del mensaje y cualquier archivo conectado.

En cumplimiento del Reglamento (UE) 2016/679 y de la Ley Orgánica 3/2018,
de 5 de diciembre, de Protección de Datos Personales y garantía de los derechos
digitales. LOPDGDD, le informamos que sus datos personales serán tratados por
JMD NÓMINAS Y PROTECCIÓN DE DATOS SL, como responsable del tratamiento, con la
finalidad de gestionar su correspondiente consulta, solicitud o petición.
Los datos serán conservados mientras sean necesarios para gestionar su
correspondiente solicitud. No se prevén cesiones o comunicaciones de datos salvo
las establecidas legalmente. Puede ejercer los derechos que reconoce la normativa
en cualquier momento, dirigiéndose a la dirección de correo de lopd@jmdnominas.com,
así como interponer una reclamación ante la AEPD cuando sea necesario.

This message has been sent via the Internet. Internet communications
are not secure against interception or modification. JMD NOMINAS therefore can
not guarantee that this message has not been
modified in transit and does not accept any legal responsibility for the
information included here.

This message and any files transmitted with it are confidential (and may be
legally privileged) and intended solely for the use of the addressee.
If you have received this message in error please notify the sender and
destroy your copies of the message and any attached files.

In compliance with Regulation (EU) 2016/679 and Organic Law 3/2018,
of December 5, Protection of Personal Data and guarantee of rights
digital. LOPDGDD, we inform you that your personal data will be processed by
JMD NÓMINAS Y PROTECCIÓN DE DATOS SL, as data controller, with the
purpose of managing your corresponding query, request or request.
The data will be kept as long as it is necessary to manage your
corresponding request. No transfers or data communications are foreseen except
those legally established. You can exercise the rights recognized by the regulations
at any time, by writing to the email address lopd@jmdnominas.com,
as well as file a claim with the AEPD when necessary.

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #18297: Error when adding a column to a parent table with complex inheritance
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: error when having sub statements with fields that do not exist