pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4
3+ messages / 3 participants
[nested] [flat]

* Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4
@ 2006-09-15 09:16 gould@embl.de
  2006-09-15 09:29 ` Re: Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4 Milen A. Radev <milen@radev.net>
  2006-09-15 09:36 ` Re: Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4 A. Kretschmer <andreas.kretschmer@schollglas.com>
  0 siblings, 2 replies; 3+ messages in thread

From: gould@embl.de @ 2006-09-15 09:16 UTC (permalink / raw)
  To: pgsql-sql

hi
I am upgrading from pgsql 7.4.1 to pgsql 8.1.4. However, some of the application
queries won't run on the newer version of pgsql.
An example of the type of query is:

SELECT
protein_external_links.protein_id, external_links.external_id,
proteins.public_name
WHERE
protein_external_links.external_link_id = external_links.id and
protein_external_links.protein_id = proteins.id and
external_links.external_database_id != 8 and
external_links.external_id_type_id = 2;

on pgsql7.4.1 what tables need to be queried seems to be implicitly deduced from
the rest of the SQL without the need for a FROM clause.
However, on pgsql 8.1.4 the following error is given:
ERROR:  missing FROM-clause entry for table "protein_external_links"

Is there some query optimization config setting I can set in pgsql 8.1.4 to fix
this problem rather than having to change  the queries in the code? I've read
over the changes between pgsql 7 and pgsql 8 but nothing seems to stand out to
me as referencing this problem. Anyone with more knowledge that can point me in
the right direction?

Thanks
Kate



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4
  2006-09-15 09:16 Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4 gould@embl.de
@ 2006-09-15 09:29 ` Milen A. Radev <milen@radev.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Milen A. Radev @ 2006-09-15 09:29 UTC (permalink / raw)
  To: pgsql-sql

gould@embl.de написа:
[...]
> Is there some query optimization config setting I can set in pgsql 8.1.4 to fix
> this problem rather than having to change  the queries in the code? I've read
> over the changes between pgsql 7 and pgsql 8 but nothing seems to stand out to
> me as referencing this problem. Anyone with more knowledge that can point me in
> the right direction?

Look here for "add_missing_from" -
http://www.postgresql.org/docs/8.1/static/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-V...


-- 
Milen A. Radev




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4
  2006-09-15 09:16 Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4 gould@embl.de
@ 2006-09-15 09:36 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
  1 sibling, 0 replies; 3+ messages in thread

From: A. Kretschmer @ 2006-09-15 09:36 UTC (permalink / raw)
  To: pgsql-sql

am  Fri, dem 15.09.2006, um 11:16:06 +0200 mailte gould@embl.de folgendes:
> Is there some query optimization config setting I can set in pgsql 8.1.4 to fix

Yes. 'add_missing_from = true' in the postgresql.conf

http://www.varlena.com/GeneralBits/Tidbits/annotated_conf_e.html

But, you should rewrite your SQL...


HTH, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-09-15 09:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-15 09:16 Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4 gould@embl.de
2006-09-15 09:29 ` Milen A. Radev <milen@radev.net>
2006-09-15 09:36 ` A. Kretschmer <andreas.kretschmer@schollglas.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox