Re: [GENERAL] Trying to install ODBC driver on Windows XP notebook

2010-06-22 Thread Gerd Koenig
Hi Phil, On Tuesday, June 22, 2010 10:19:33 pm Phil Jackson wrote: I have latest Postgresql installed on a notebook and now trying to install the driver which I have downloaded and run so that it is now available in the ODBC Data Source Administrator This machine has CA security suite,

[GENERAL] Hot Standby switchover

2010-06-22 Thread Shoaib Mir
Hi All, Just been trying to learn hot-standby and couldn't figure out a solution to something like this while doing a switchover: I have three nodes where A = Master B = Slave1 C = Slave2 Now Hot-Standby is setup like this... A -- B A -- C Now if I will like to do a switch so as to make B

Re: [GENERAL] Problem Using RowType Declaration with Table Domains

2010-06-22 Thread Tom Lane
George Weaver gwea...@shaw.ca writes: I have the following (very simplified) scenario: CREATE DOMAIN orderstatus AS text NOT NULL DEFAULT 'Open'; CREATE TABLE orders ( orderno serial , status orderstatus ,

[GENERAL] How to flatten a database table

2010-06-22 Thread mai fawzy
Hi All, I have a table that has the following fields: IDMoney Date State 1 20 2010-01-01 done 2 10 2010-01-02done 3 . . . . n I need to select the values from this table to join them 2 another select statement but

Re: [GENERAL] High Availability with Postgres

2010-06-22 Thread Devrim GÜNDÜZ
On Mon, 2010-06-21 at 23:08 -0400, Greg Smith wrote: The hard part of shared storage failover is always solving the shoot the other node in the head problem, to keep a down node from coming back once it's no longer the active one. In order to do that well, you really need to lock the now

Re: [GENERAL] How to flatten a database table

2010-06-22 Thread Thomas Kellerer
mai fawzy, 22.06.2010 10:38: I have a table that has the following fields: IDMoney Date State 1 20 2010-01-01 done 2 10 2010-01-02done I need to select the values from this table to join them 2 another select statement but the

Re: [GENERAL] What type of index should I use?

2010-06-22 Thread Dimitri Fontaine
Mike Christensen m...@kitchenpc.com writes: I have a varying(200) text column that I need to be able to do lookups on very fast (WHERE col = 'foo') Btree is what to use here. GIN covers cases where you index arrays. I estimate the table will hold around 5,000 rows, never any more. It

Re: [GENERAL] High Availability with Postgres

2010-06-22 Thread Dimitri Fontaine
John R Pierce pie...@hogranch.com writes: failure modes can include things like failing fans (which will be detected, resulting in a server shutdown if too many fail), power supply failure (redundant PSUs, but I've seen the power combining circuitry fail). Any of these sorts of failures

Re: [GENERAL] Hot Standby switchover

2010-06-22 Thread Dimitri Fontaine
Hi, Shoaib Mir shoaib...@gmail.com writes: Now Hot-Standby is setup like this... A -- B  A -- C Now if I will like to do a switch so as to make B the new master and have my replication look like this: B -- C  B -- A Where are the steps I need for doing so? First, you need a common

Re: [GENERAL] How to force select to return exactly one row

2010-06-22 Thread Andrus
Martin, Also I too am confused by empty row. Are you trying to loop through the results in code and it fails if there are no rows at all? Or some other equally odd thing? =) Anyway here is an example UNION that I think would work (but note, this row will always be included even when your

Re: [GENERAL] pgpool

2010-06-22 Thread Geoffrey
A couple of questions regarding pgpool: Is there a problem with using multiple connection pools for the same database? Point being, we might want to give a higher number of connections to one group of users then another. I can see doing this by having separate connection pools. The higher

Re: [GENERAL] High Availability with Postgres

2010-06-22 Thread Greg Smith
John R Pierce wrote: I don't like power cycling servers, so I'd prefer not to use power switch based fencing, although I believe my blade box's management unit is supported as a power fencing device. I consider power control fencing to be a secondary resort if you don't have hardware where a

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Is there any technical obstacle to anyone creating PL/PHP? I am cruious as to why it doesn't alreay exist. Obviously we need to improve our documentation. What led you to believe it does not exist? As pointed out downthread, it does exist

Re: [GENERAL] How to force select to return exactly one row

2010-06-22 Thread Dean Rasheed
2010/6/21 Andrus kobrule...@hot.ee: if there is no searched primary key row in ko database, select should also return empty row. To get this result I added right join: SELECT somecolumns FROM ko RIGHT JOIN (SELECT 1) _forceonerow ON true LEFT JOIN t1 ON t1.primarykey= ko.t1foreignkwey

Re: [GENERAL] Trying to install ODBC driver on Windows XP notebook

2010-06-22 Thread Garry Saddington
Phil Jackson wrote: I have latest Postgresql installed on a notebook and now trying to install the driver which I have downloaded and run so that it is now available in the ODBC Data Source Administrator This machine has CA security suite, latest version installed and I have added a network

Re: [GENERAL] Hot Standby switchover

2010-06-22 Thread Shoaib Mir
On Tue, Jun 22, 2010 at 7:08 PM, Dimitri Fontaine dfonta...@hi-media.comwrote: Now, you can change the primary_conninfo on C so that it connects to B. I guess that means a restart. Note that you only want to do that once server B is the new master, so has been triggered as such. That means a

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Brett Mc Bride
There's this one: https://www.commandprompt.com/community/plphp/ -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Carlo Stonebanks Sent: Tuesday, 22 June 2010 1:29 PM To: pgsql-general@postgresql.org Subject: [GENERAL]

[GENERAL] How to Insert and retrieve multilingual (Hindi an Indian language) into PostgreSQL

2010-06-22 Thread venkat
Dear All, I want to insert and retrieve multilingual (Hindi) into database.is PostgreSQL supports that ?if it is ... please guide me how to enable multilingual in the table. I am waiting for your great response. Thanks and Regards, Venkat

Re: [GENERAL] What type of index should I use?

2010-06-22 Thread Adrian von Bidder
On Tuesday 22 June 2010 10.49:00 Dimitri Fontaine wrote: I estimate the table will hold around 5,000 rows, never any more. It could be that you're better off without any index, depending on the size of rows you put in there, and the overall memory usage patterns you have. I agree: don't

Re: [GENERAL] How to Insert and retrieve multilingual (Hindi an Indian language) into PostgreSQL

2010-06-22 Thread Thom Brown
On 22 June 2010 11:48, venkat ven.tammin...@gmail.com wrote: Dear All,   I want to insert and retrieve multilingual (Hindi) into database.is PostgreSQL supports that ?if it is ... please guide me how to enable multilingual in the table.     I am waiting for your great response. Thanks and

[GENERAL] Re: [SQL] How to Insert and retrieve multilingual (Hindi an Indian language) into PostgreSQL

2010-06-22 Thread Pavel Stehule
Hello PostgreSQL doesn't support multilangual tables now - etc it isn't more than one collation per database. But you can store any langual text when this language is supported by UTF8. Just use UTF8 encoding for your database. Regards Pavel Stehule see help for initdb and createdb commands

[GENERAL] Re: How to Insert and retrieve multilingual (Hindi an Indian language) into PostgreSQL

2010-06-22 Thread Stephane Bortzmeyer
On Tue, Jun 22, 2010 at 04:18:48PM +0530, venkat ven.tammin...@gmail.com wrote a message of 39 lines which said: I want to insert and retrieve multilingual (Hindi) into database.is PostgreSQL supports that ? [Currently, I'm storing arabic texts in a PostgreSQL database.

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Alvaro Herrera
Excerpts from Greg Sabino Mullane's message of mar jun 22 13:51:35 UTC 2010: I mean, I love my Tcl support, and I know this is part of PG's legacy... but Tcl and no PHP? I figure there's a tech reason for this - the demand must be there! No? No, I'd say the demand is most definitely

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Joshua D. Drake
On Tue, 2010-06-22 at 13:51 +, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Is there any technical obstacle to anyone creating PL/PHP? I am cruious as to why it doesn't alreay exist. Obviously we need to improve our documentation. What led you to

Re: [GENERAL] A thought about other open source projects

2010-06-22 Thread Chris Browne
bnich...@ca.afilias.info (Brad Nicholson) writes: Scott Marlowe wrote: As with phrases like, the quickest way to grill a unicorn steak, that it can be stated in a few words does not make in possible. Exactly. The big issue here is that nobody's saying what kind of app they want to write.

[GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-22 Thread Deven
Hi all, I am using Postgresql Database for our system storage and I am running Autovacuuming Deamon on my entire database. But on of the table set in my database never undergoes the Autovacuuming. I always need to do the manual vacuuming on that table. Can anyone kindly tell me the solution for

Re: [GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-22 Thread Scott Marlowe
On Tue, Jun 22, 2010 at 5:50 AM, Deven deven...@covacsis.com wrote: Hi all, I am using Postgresql Database for our system storage and I am running Autovacuuming Deamon on my entire database. But on of the table set in my database never undergoes the Autovacuuming. I always need to do the

Re: [GENERAL] libpython - cannot open shared object file

2010-06-22 Thread Tom Wilcox
Hi, Can anyone help me get up and running on Ubuntu 64-bit Server (lucid) OS with PostgreSQL 64-bit and Python 2.6? (Please note that this is all running in a VirtualBox VM however I am not convinced that is relevant here) I have a load of functions written in plpythonu and I can't run

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Alvaro Herrera
Excerpts from Joshua D. Drake's message of mar jun 22 12:16:11 -0400 2010: On Tue, 2010-06-22 at 13:51 +, Greg Sabino Mullane wrote: * Hard to find: ** First google hit on pl/php is projects.commandprompt.com/public/plphp ** Which simply says: Go here instead:

Re: [GENERAL] libpython - cannot open shared object file

2010-06-22 Thread Adrian Klaver
On 06/22/2010 09:52 AM, Tom Wilcox wrote: Hi, Can anyone help me get up and running on Ubuntu 64-bit Server (lucid) OS with PostgreSQL 64-bit and Python 2.6? (Please note that this is all running in a VirtualBox VM however I am not convinced that is relevant here) I have a load of functions

Re: [GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-22 Thread Joao Ferreira
Hello, On Tue, 2010-06-22 at 04:50 -0700, Deven wrote: Hi all, I am using Postgresql Database for our system storage and I am running Autovacuuming Deamon on my entire database. But on of the table set in my database never undergoes the Autovacuuming. I always need to do the manual

Re: [GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-22 Thread Joao Ferreira gmail
Hello, On Tue, 2010-06-22 at 04:50 -0700, Deven wrote: Hi all, I am using Postgresql Database for our system storage and I am running Autovacuuming Deamon on my entire database. But on of the table set in my database never undergoes the Autovacuuming. I always need to do the manual

[GENERAL] what happens to postmaster?

2010-06-22 Thread zach cruise
...when i am importing a table (from oracle, or updating it), and a user queries that same table? is it ok to be concerned about corruption etc. using 8.1. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] what happens to postmaster?

2010-06-22 Thread Dann Corbit
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of zach cruise Sent: Tuesday, June 22, 2010 11:09 AM To: pgsql-general@postgresql.org Subject: [GENERAL] what happens to postmaster? ...when i am importing a table

Re: [GENERAL] what happens to postmaster?

2010-06-22 Thread Bill Moran
In response to zach cruise zachc1...@gmail.com: ...when i am importing a table (from oracle, or updating it), and a user queries that same table? I depends on a lot of information you haven't provided ... Is the update inside a transaction? Have you locked the table? The real answer is:

Re: [GENERAL] High Availability with Postgres

2010-06-22 Thread John R Pierce
On 06/22/10 1:58 AM, Dimitri Fontaine wrote: John R Piercepie...@hogranch.com writes: failure modes can include things like failing fans (which will be detected, resulting in a server shutdown if too many fail), power supply failure (redundant PSUs, but I've seen the power combining

[GENERAL] SQL error: could not connect to database

2010-06-22 Thread Juba, Salahaldin I.
I am trying to connect to database using ECPG called 'database' - please see the code below-. When I am excuting the code I am getting this message Fatal error SQL error: could not connect to database database on line 22 Fatal error SQL error: connection NULL does not exist on line 23

[GENERAL] how to create an admin user for restore database.

2010-06-22 Thread Sam Wun
Hi, With PG 8.4, I can't find a documentation to show me how to create a super user or admin user for the PGSQL. I have crated a user called liferayadmin and a database liferay. then executed the following command: GRANT ALL PRIVILEGES ON DATABASE liferay to liferayadmin; When I launched

Re: [GENERAL] libpython - cannot open shared object file

2010-06-22 Thread Tom Lane
Adrian Klaver adrian.kla...@gmail.com writes: On 06/22/2010 09:52 AM, Tom Wilcox wrote: ERROR: could not load library /opt/PostgreSQL/8.4/lib/postgresql/plpython.so: libpython2.3.so.1.0: cannot open shared object file: No such file or directory I have python2.6 installed. It seems

Re: [GENERAL] how to create an admin user for restore database.

2010-06-22 Thread Adrian Klaver
On Tuesday 22 June 2010 6:50:28 pm Sam Wun wrote: Hi, With PG 8.4, I can't find a documentation to show me how to create a super user or admin user for the PGSQL. I have crated a user called liferayadmin and a database liferay. then executed the following command: GRANT ALL PRIVILEGES ON

Re: [GENERAL] how to create an admin user for restore database.

2010-06-22 Thread Sam Wun
With user liferayadmin on db liferay, I got the following errors: 03:14:50,558 WARN [DBUtil:474] ERROR: permission denied for relation quartz_locks: insert into QUARTZ_LOCKS values('TRIGGER_ACCESS'); 03:14:50,567 WARN [DBUtil:474] ERROR: permission denied for relation quartz_locks: insert into

[GENERAL] java.lang.NegativeArraySizeException from ReceiveTupleV3(PGStream.java:349) ...

2010-06-22 Thread S K
Our application has been in production for a couple of years. Recent investigation into a problem revealed the following error started a few months back. I restarted the application, but the error appears after a few days and the thread dies. Any ideas on how to debug this issue is appreciated.

[GENERAL] best way to check pgdump

2010-06-22 Thread Janet Jacobsen
Hi. What is the best way to check a pgdump without doing a restore? Thanks, Janet

[GENERAL] calling vacuum from a script

2010-06-22 Thread Janet Jacobsen
Hi. Is it possible to vacuum a table (vacuum full analyze) from a script. Currently I run the Postgres client and then run vacuum, but I'd like to automate the vacuum by calling it from a (Perl) script. Thanks, Janet

Re: [GENERAL] calling vacuum from a script

2010-06-22 Thread David Dick
On 23/06/10 13:44, Janet Jacobsen wrote: Hi. Is it possible to vacuum a table (vacuum full analyze) from a script. Currently I run the Postgres client and then run vacuum, but I'd like to automate the vacuum by calling it from a (Perl) script. see attached for example. vacuum.pl

Re: [GENERAL] calling vacuum from a script

2010-06-22 Thread Devrim GÜNDÜZ
On Tue, 2010-06-22 at 20:44 -0700, Janet Jacobsen wrote: Is it possible to vacuum a table (vacuum full analyze) from a script. Use vacuumdb command. (Why are you using VACUUM FULL? It has been considered harmful, at least for a regular maintenance job.) -- Devrim GÜNDÜZ PostgreSQL

Re: [GENERAL] calling vacuum from a script

2010-06-22 Thread John R Pierce
On 06/22/10 8:44 PM, Janet Jacobsen wrote: Hi. Is it possible to vacuum a table (vacuum full analyze) from a script. Currently I run the Postgres client and then run vacuum, but I'd like to automate the vacuum by calling it from a (Perl) script. postgres since 8.1 has had autovacuum,