Обсуждение: Problems with timestamp.
Hi. I've been using PostgreSQL 7.1.3 for a year without problems. Last week I installed a new server with Red Hat 7.2 and PostgreSQL 7.2.1 I've copied my database by using "pg_dumpall" from my old server to the new one. But now the following query doesn't work: SELECT date_part('year', fechaacta) AS "A�o de donaci�n", sexo AS "Sexo", count(*) AS "Cantidad de donantes" FROM "Capital" WHERE date_part('year', age(timestamp(fechanacimiento))) BETWEEN 1 AND 100 AND "fecha" BETWEEN '2001/01/01' AND '2002/12/31' GROUP BY date_part('year', fechaacta), sexo the answer from server was: Warning: PostgreSQL query failed: ERROR: parser: parse error at or near "fechanacimiento" in /var/www/html/ActasPcias/consultas.php on line 471 note: I've taken a care that "fechanacimiento" was a field of table "Capital". Exactly the same query in exactly the same database works perfectly on my old server Can anybody tell me what's going on ? Thanks. Juan Pablo __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com
Few questions: What's the largest number of records anyone's got currently? What are the advantages of Postgres over other RDBMSs? not for me - just need to know opinions Gareth -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Juan Pablo Sent: 18 July 2002 14:40 To: pgsql-admin@postgresql.org Subject: [ADMIN] Problems with timestamp. Hi. I've been using PostgreSQL 7.1.3 for a year without problems. Last week I installed a new server with Red Hat 7.2 and PostgreSQL 7.2.1 I've copied my database by using "pg_dumpall" from my old server to the new one. But now the following query doesn't work: SELECT date_part('year', fechaacta) AS "Aqo de donacisn", sexo AS "Sexo", count(*) AS "Cantidad de donantes" FROM "Capital" WHERE date_part('year', age(timestamp(fechanacimiento))) BETWEEN 1 AND 100 AND "fecha" BETWEEN '2001/01/01' AND '2002/12/31' GROUP BY date_part('year', fechaacta), sexo the answer from server was: Warning: PostgreSQL query failed: ERROR: parser: parse error at or near "fechanacimiento" in /var/www/html/ActasPcias/consultas.php on line 471 note: I've taken a care that "fechanacimiento" was a field of table "Capital". Exactly the same query in exactly the same database works perfectly on my old server Can anybody tell me what's going on ? Thanks. Juan Pablo __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html