Re: [GENERAL] Forward referencing of table aliases in subqueries does not work in 9.1 beta2 ( works in 9.0 and 8.4.2 )

2011-06-20 Thread Tom Lane
BangarRaju Vadapalli bangarraju.vadapa...@infor.com writes: The select query for creating the view is executing fine in 8.4.2. But not in 9.1 beta2. The issue is forward referencing of table aliases in subqueries is not working fine in 9.1 beta2. This complaint is unintelligible. Please

[GENERAL] Postgres service refuses to start on windows

2011-06-20 Thread Roman Isitua
hello ! I having an issue with my postgres database installed on a windows xp. For some reason, I can no longer start the postgres service through pgadmin or the services window. I get the following error: Error 1053: The service did not respond to the start or control request in a timely

Re: [GENERAL] Location Data

2011-06-20 Thread Christian Ullrich
* Adarsh Sharma wrote: Today I am facing a simple problem that I fail to solve after 2 day try. I have a places table in database whose structure is as : CREATE TABLE places ( woe_id character varying(15) NOT NULL, iso character varying(6), name text, language character varying(6), place_type

Re: [GENERAL] Location Data

2011-06-20 Thread Christian Ullrich
* Adarsh Sharma wrote: Christian Ullrich wrote: Write a set of functions to get the higher-level structures (country for states, etc.) for any given record, and put a trigger on the table that populates the fields on insert and update. All the world data is populated in the places

Re: [GENERAL] Postgres service refuses to start on windows

2011-06-20 Thread Craig Ringer
On 20/06/11 14:45, Roman Isitua wrote: hello ! I having an issue with my postgres database installed on a windows xp. For some reason, I can no longer start the postgres service through pgadmin or the services window. I get the following error: Error 1053: The service did not respond to the

Re: [GENERAL] Forward referencing of table aliases in subqueries does not work in 9.1 beta2 ( works in 9.0 and 8.4.2 )

2011-06-20 Thread Craig Ringer
On 20/06/11 13:59, Tom Lane wrote: BangarRaju Vadapalli bangarraju.vadapa...@infor.com writes: The select query for creating the view is executing fine in 8.4.2. But not in 9.1 beta2. The issue is forward referencing of table aliases in subqueries is not working fine in 9.1 beta2. This

[GENERAL] connection time out

2011-06-20 Thread salah jubeh
Hello Guys, I have a database server and I have created another replica of it on another machine. The new replica is running fine locally, but I can not access it from another clients, the pg_hba.conf file is the same as the original database server. when I try to connect to the server I

Re: [GENERAL] Port forwarding via iptables to postgres listening locally

2011-06-20 Thread David Resnick
I've turned on connection logging in postgres; there is no indication of any connection attempt. There don't seem to be any additional rules configured in iptables that would drop the packets. Are the tables set to drop by default, or allow by default? They are set to drop by default. I'll

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
On Mon, Jun 20, 2011 at 5:08 AM, Amitabh Kant amitabhk...@gmail.com wrote: On Mon, Jun 20, 2011 at 1:43 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello Cedric and others, On Sun, Jun 19, 2011 at 9:56 PM, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/6/19

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Alexander Farber
I've added $db-beginTransaction(); $db-commit(); around _all_ statements, but now get: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block quite often. I don't understand why would transaction

Re: [GENERAL] Forward referencing of table aliases in subqueries does not work in 9.1 beta2 ( works in 9.0 and 8.4.2 )

2011-06-20 Thread BangarRaju Vadapalli
Hi Tom, Self contained test case attached... When executing the query below in 9.1 beta 2 we are getting the error ERROR: JOIN qualification cannot refer to other relations. The same query is executing fine in 8.4.2 and 9.0. SELECT dbai.dim_base_agg_instr_key AS instr_key,

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
On Mon, Jun 20, 2011 at 9:36 AM, Alexander Farber alexander.far...@gmail.com wrote: I've added  $db-beginTransaction();    $db-commit(); around _all_ statements, but now get: I don't think that was a good idea.  SQLSTATE[25P02]: In failed sql transaction:  7 ERROR: current  

[GENERAL] unique across two tables

2011-06-20 Thread Tarlika Elisabeth Schmitz
I have two tables, town and townalias, the latter containing alternative town names. I would like to ensure that a town name is unique per country-region across the two tables. Can I do this with a constraint ot do I need to implement the logic via trigger? = PostgreSQl 8.4 CREATE

Re: [GENERAL] unique across two tables

2011-06-20 Thread tv
I have two tables, town and townalias, the latter containing alternative town names. I would like to ensure that a town name is unique per country-region across the two tables. Can I do this with a constraint ot do I need to implement the logic via trigger? You can't have a constraint

Re: [GENERAL] connection time out

2011-06-20 Thread salah jubeh
Hello Guys, It was about some firewall rules setup by the system administrator. Thanks From: salah jubeh s_ju...@yahoo.com To: pgsql pgsql-general@postgresql.org Sent: Mon, June 20, 2011 12:39:51 PM Subject: [GENERAL] connection time out Hello

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Alexander Farber
Hell Marko and others, On Mon, Jun 20, 2011 at 4:08 PM, Marko Kreen mark...@gmail.com wrote: Maybe I should try session mode of pgbouncer again, now that I've got rid of the persistent PHP connections? You could, but try to turn off prepared statements in PDO first. isn't having prepared

Re: [GENERAL] unique across two tables

2011-06-20 Thread Alban Hertroys
On 20 Jun 2011, at 17:03, Tarlika Elisabeth Schmitz wrote: I have two tables, town and townalias, the latter containing alternative town names. I would like to ensure that a town name is unique per country-region across the two tables. Can I do this with a constraint ot do I need to

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Alexander Farber
Nope, pool_mode = session kills my site... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
thank you Greg, here is what I get, I createed view as you suggested. I'm not sure why tablespace column is empty profiler1=# select * from pg_tables where schemaname ='public' limit 10; schemaname |tablename| tableowner | tablespace | hasindexes | hasrules | hastri ers

Re: [GENERAL] unique across two tables

2011-06-20 Thread Tarlika Elisabeth Schmitz
On Mon, 20 Jun 2011 19:42:20 +0200 Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 20 Jun 2011, at 17:03, Tarlika Elisabeth Schmitz wrote: I have two tables, town and townalias, the latter containing alternative town names. I would like to ensure that a town name is unique per

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
That's right, if the tables are in default tablespace, those columns will be blank, if any of the table created under any of the tablespace then it will show up. Eg:- postgres=# show default_tablespace ; (this would be blank becz am in pg_default/pg_global) default_tablespace

Re: [GENERAL] Forward referencing of table aliases in subqueries does not work in 9.1 beta2 ( works in 9.0 and 8.4.2 )

2011-06-20 Thread Tom Lane
BangarRaju Vadapalli bangarraju.vadapa...@infor.com writes: create table a(x int); create table b(x int, y int); create table c(x int, y int, z int); This query fails with ERROR: JOIN qualification cannot refer to other relations - select a.x from a, b where a.x = b.x and not exists ( select

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
well, here is the query : profiler1=# select relname,reltablespace from pg_class where reltablespace in(select oid from pg_tablespace where spcname not in ('pg_default','pg_global')); relname | reltablespace -+--- why it shows no records? profiler1=# select * from

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
let me correct on this query, it shows only those tables which wont belong to default_tablespace... select relname,reltablespace from pg_class where reltablespace in(select oid from pg_tablespace where spcname not in ('pg_default','pg_global')); --- Best Regards, Raghavendra EnterpriseDB

[GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread Leon Match
Hello, I am trying to re-create few objects from oracle into postgres. I have a problem inserting a timestamp value into the table: insert into request_queue (request_id, received_time ) values (new.request_id,

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
hmmmStrange.. What is the output of select oid,* from pg_tablespace; and select relname,reltablespace from pg_class where relname=' application_category'; --- Best Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Tue, Jun 21, 2011 at 12:48 AM,

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread Scott Ribe
On Jun 20, 2011, at 1:32 PM, Leon Match wrote: How can I insert a dynamic timestamp value in postgress, please? http://www.postgresql.org/docs/9.0/static/functions-datetime.html -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread David Johnston
Please look at the section on Date/Time Functions in the PostgreSQL documentation (Section 9.9 in Version 9.0 documentation) for a full listing of the date and time functions available in PostgreSQL and how they work. There is a sub-section (9.9.4) that specifically details functions that return

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
here it is : profiler1=# select oid,* from pg_tablespace; oid | spcname | spcowner | spclocation | spcacl ---++--+--+ 1663 | pg_default | 10 | | 1664 | pg_global | 10 | |

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
profiler1=# select * from pg_catalog.pg_tables where tablename='application_category'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastrigge rs +--++++--+-- ---

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
profiler1=# select relname,reltablespace from pg_class where relname='application_category'; relname| reltablespace --+--- application_category | 0 (1 row) -- View this message in context:

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread Condor
On Mon, 20 Jun 2011 15:32:31 -0400, Leon Match wrote: Hello, I am trying to re-create few objects from oracle into postgres. I have a problem inserting a timestamp value into the table: insert into request_queue (request_id, received_time ) values (new.request_id,

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
Can you give a try updating the catalogs with ANALYZE command and re-check ? --- Best Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Tue, Jun 21, 2011 at 2:22 AM, hyelluas helen_yell...@mcafee.com wrote: profiler1=# select relname,reltablespace from

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread Raghavendra
Actually to say, everything looks ok to me, until unless you say the table * '**application_category'* on other tablespace ... :) profiler1=# select relname,reltablespace from pg_class where relname='application_category'; relname| reltablespace

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-20 Thread Jaime Casanova
El 20/06/2011 14:33, Leon Match leon.ma...@convergia.net escribió: Hello, I am trying to re-create few objects from oracle into postgres. I have a problem inserting a timestamp value into the table: insert into request_queue (request_id, received_time

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
that is exactly the case - application_category table is in profiler1 tablespace as well as all tables in my profilre1 database. I'm not sure how to update catalog... vacuum ? -- View this message in context:

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Alexander Farber
PDO::ATTR_EMULATE_PREPARES = true kills my server too... On Mon, Jun 20, 2011 at 7:34 PM, Alexander Farber alexander.far...@gmail.com wrote: Nope, pool_mode = session kills my site... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] how to find a tablespace for the table?

2011-06-20 Thread hyelluas
I've got it now - it will be 0/empty for a table in default tablespace, if the table has been created in a different tablespace - it will show the name. thank you!. Helen -- View this message in context:

[GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-20 Thread Vikram Vaswani
Hello I'm new to PostgreSQL, coming at it from a MySQL background. I'm currently looking at switching one of our applications (which currently uses MySQL) over to PostgreSQL and had some questions. We're considering the switch because of issues we have faced when using MySQL in a clustered

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-20 Thread David Fetter
On Tue, Jun 21, 2011 at 05:07:10AM +, Vikram Vaswani wrote: Hello I'm new to PostgreSQL, coming at it from a MySQL background. I'm currently looking at switching one of our applications (which currently uses MySQL) over to PostgreSQL and had some questions. We're considering the

[GENERAL] Tuning for a tiny database

2011-06-20 Thread CSS
Hello, I couldn't find much information in the archives on this -- perhaps this is a bit of a specialized need, but I was hoping for some input from some experienced postgres admins. I'm moving some DNS servers from djbdns/tinydns to PowerDNS. While it supports many backends, postgresql seems