Re: [GENERAL] Query in postgreSQL version Windows
Yes it is the version 8.1.1 and the error is ERROR: missing FROM-clause entry for table pg_class I have too many queries like this in my program and I was thinking maybe is the fault of installation like I missed something. Is there anything I can do or it's the wrong way I was doing the queries in SQL - Original Message - From: Michael Fuhr [EMAIL PROTECTED] To: Ardian Xharra (Boxxo) [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Monday, January 02, 2006 4:29 PM Subject: Re: [GENERAL] Query in postgreSQL version Windows On Mon, Jan 02, 2006 at 04:01:56PM -0500, Ardian Xharra (Boxxo) wrote: I installed PostgreSQL on windows and when I try to run some queries pgadmin says an error. What version of PostgreSQL? What's the exact error message? That often provides a clue as to what's wrong. I'll guess that the Windows box is running 8.1.x and the error is: ERROR: missing FROM-clause entry for table pg_class I know that if I change the query this it will work but is it possible to make this quey work in this way Why don't you want to rewrite the query? SELECT atthasdef FROM pg_attribute WHERE attrelid=pg_class.oid AND pg_class.relname='client_overtime' AND attname='id_client_overtime' This query works fine in PostgreSQL (Linux-Unix platform) Another guess: the Linux box is running a version of PostgreSQL older than 8.1, or if it's running 8.1 then you've enabled add_missing_from. As the 8.1 Release Notes mention, that option is now disabled by default. Rather than trying to make the query work as-is, rewrite it to be proper SQL by adding pg_class to the FROM clause. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 02/01/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 02/01/2006 ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Query in postgreSQL version Windows
Thank you Micheal it was the add_missing_from And sorry for the last post I didn't read the whole message from you. Ardian -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 02/01/2006 ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Query in postgreSQL version Windows
Ardian Xharra \(Boxxo\) [EMAIL PROTECTED] writes: Yes it is the version 8.1.1 and the error is ERROR: missing FROM-clause entry for table pg_class I have too many queries like this in my program and I was thinking maybe is the fault of installation like I missed something. Is there anything I can do or it's the wrong way I was doing the queries in SQL You can set add_missing_from = true to reproduce the pre-8.1 behavior, but in the long run you'd be better off fixing your code. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[GENERAL] Query in postgreSQL version Windows
Hello, there I installed PostgreSQL on windows and when I try to run some query's pgadmin says an error. I know that if I change the query this it will workbut is it possible to make this quey work in this way SELECT atthasdef FROM pg_attribute WHERE attrelid=pg_class.oid AND pg_class.relname='client_overtime' AND attname='id_client_overtime' Thx
[GENERAL] Query in postgreSQL version Windows
Hello, there I installed PostgreSQL on windows and when I try to run some queries pgadmin says an error. I know that if I change the query this it will workbut is it possible to make this quey work in this way SELECT atthasdef FROM pg_attribute WHERE attrelid=pg_class.oid AND pg_class.relname='client_overtime' AND attname='id_client_overtime' This query works fine in PostgreSQL (Linux-Unix platform) Thx No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 02/01/2006 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] Query in postgreSQL version Windows
Hello, there I installed PostgreSQL on windows and when I try to run some queries pgadmin says an error. I know that if I change the query this it will workbut is it possible to make this quey work in this way SELECT atthasdef FROM pg_attribute WHERE attrelid=pg_class.oid AND pg_class.relname='client_overtime' AND attname='id_client_overtime' This query works fine in PostgreSQL (Linux-Unix platform) Thx No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.10/218 - Release Date: 02/01/2006 ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Query in postgreSQL version Windows
On Mon, Jan 02, 2006 at 04:01:56PM -0500, Ardian Xharra (Boxxo) wrote: I installed PostgreSQL on windows and when I try to run some queries pgadmin says an error. What version of PostgreSQL? What's the exact error message? That often provides a clue as to what's wrong. I'll guess that the Windows box is running 8.1.x and the error is: ERROR: missing FROM-clause entry for table pg_class I know that if I change the query this it will work but is it possible to make this quey work in this way Why don't you want to rewrite the query? SELECT atthasdef FROM pg_attribute WHERE attrelid=pg_class.oid AND pg_class.relname='client_overtime' AND attname='id_client_overtime' This query works fine in PostgreSQL (Linux-Unix platform) Another guess: the Linux box is running a version of PostgreSQL older than 8.1, or if it's running 8.1 then you've enabled add_missing_from. As the 8.1 Release Notes mention, that option is now disabled by default. Rather than trying to make the query work as-is, rewrite it to be proper SQL by adding pg_class to the FROM clause. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings