using WHERE and AND in SELECT

From: Jean-Yves MARTIN <Jean-Yves(dot)Martin(at)ec-nantes(dot)fr>
To: pgsql-bugs(at)postgresql(dot)org
Subject: using WHERE and AND in SELECT
Date: 2017-06-08 12:12:07
Message-ID: 27B4C0D6-6744-4F25-9DA5-2BAE3AF8B6A3@ec-nantes.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

We had an issue when writing a SELECT request : we write:
select personne_id from personne inner join conducteur on (conducteur.personne_id=personne.personne_id) and personne.personne_id<20

instead of:
select personne_id from personne inner join conducteur on (conducteur.personne_id=personne.personne_id) where personne.personne_id<20

and there is no syntax error. both give the same result.

is it a bug in the SQL grammar or is it a usable syntax?

regards,

JY Martin.

Jean-Yves MARTIN
Responsable Option Informatique

Dept Informatique et Mathématiques
Centrale Nantes
1 rue de la Noë
44321 Nantes, cedex 3
France

Tel: +33 2 40 37 25 98
Mail: Jean-Yves(dot)Martin(at)ec-nantes(dot)fr <mailto:Jean-Yves(dot)Martin(at)ec-nantes(dot)fr>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message K S, Sandhya (Nokia - IN/Bangalore) 2017-06-08 12:25:14 Re: [BUGS] Crash observed during the start of the Postgres process
Previous Message Michael Paquier 2017-06-08 00:07:40 Re: [PATCH] Fixed malformed error message on malformed SCRAM message.