Re: [postgresql-it] SELECT senza la FROM

  • From: Marco Mariani <marco.mariani@xxxxxxxxxxxx>
  • To: postgresql-it <postgresql-it@xxxxxxxxxxxxx>
  • Date: Thu, 03 Apr 2008 10:13:36 +0200

Gianni Giusti wrote:

Devo cambiare una serie di query, su un programma in php, che non ho fatto io. Ho notato che molte sono SELECT senza la FROM..... evidentemente postgresql le accettava. Il problema è che con il nuovo postgresql, quelle query, giustamente, mi restituiscono errore.
Esiste un impostazione di postgresql 8 che mi permette di far funzionare quelle query, senza che io vada a mettere le FROM a manina?

Forse questa

add_missing_from (boolean)

   When on, tables that are referenced by a query will be automatically
   added to the FROM clause if not already present. This behavior does
   not comply with the SQL standard and many people dislike it because
   it can mask mistakes (such as referencing a table where you should
   have referenced its alias). The default is off. This variable can be
   enabled for compatibility with releases of PostgreSQL prior to 8.1,
   where this behavior was allowed by default.

   Note that even when this variable is enabled, a warning message will
   be emitted for each implicit FROM entry referenced by a query. Users
   are encouraged to update their applications to not rely on this
   behavior, by adding all tables referenced by a query to the query's
   FROM clause (or its USING clause in the case of DELETE).


--
This e-mail (and any attachment(s)) is strictly confidential and for use only 
by intended recipient(s).  Any use, distribution, reproduction or disclosure by 
any other person is strictly prohibited. The content of this e-mail does not 
constitute a commitment by the Company except where provided for in a written 
agreement between this e-mail addressee and the Company.
If you are not an intended recipient(s), please notify the sender promptly and 
destroy this message and its attachments without reading or saving it in any 
manner.
Any non authorized use of the content of this message constitutes a violation 
of the obligation to abstain from learning of the correspondence among other 
subjects, except for more serious offence, and exposes the person responsible 
to the relevant consequences.


Other related posts: