Re: [GENERAL] Duplicated entries are not ignored even if a "do instead nothing" rule is added.

2012-01-02 Thread Alban Hertroys
On 3 Jan 2012, at 5:20, 邓尧 wrote: > Hi, > > I'm new to pgsql, I need the do something like the "INSERT IGNORE" in mysql. > After some searching I got a solution, which is adding a "do instead nothing" > rule to the corresponding table, but it fails sometimes. Yeah, if a concurrent transaction

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Thomas Markus
Hi Hagen, all german umlaut characters works fine in postgres from my experience. Seems you have encoding issues between windows tools/console/db-client. Use a utf8 capable client. Any java tool or pgadmin or similar are fine. regards Thomas Am 02.01.2012 20:13, schrieb Hagen Finley: Hi,

Re: [GENERAL] stop server

2012-01-02 Thread Raghavendra
Also what are the last lines of logs showing. Can you stop trying from the bin directory ... $cd /usr/local/Cellar/postgresql/9.1.2/bin/ $./pg_ctl -D /usr/local/var/postgres stop -mi --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Tue, Jan 3, 2012 at 11:

Re: [GENERAL] stop server

2012-01-02 Thread roberto sanchez muñoz
still failing it shows pg_ctl -D /usr/local/var/postgres stop -mi waiting for server to shut down... failed pg_ctl: server does not shut down El 02/01/2012, a las 23:09, Raghavendra escribió: > Seems, some process are still running and

Re: [GENERAL] stop server

2012-01-02 Thread Roberto Sanchez
show this ps -ef | grep postgres 501 1402 100 0 0:00.10 ?? 0:00.15 /usr/local/Cellar/postgresql/9.1.2/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log 501 1404 1402 0 0:00.00 ?? 0:00.00 postgres: writer process 501 1405 1402 0 0

Re: [GENERAL] stop server

2012-01-02 Thread Raghavendra
Two things: 1. See the output of the postgres process which are running with utility commands. ps -ef | grep postgres 2. Also, take look in the logs for any information written on any process which is running and failing to abort. --- Regards, Raghavendra EnterpriseDB Corporation Blog: htt

Re: [GENERAL] stop server

2012-01-02 Thread Raghavendra
Seems, some process are still running and looking for database access. You can try unclean shutdown IMMEDIATE with below option by forcing all process to stop pg_ctl -D /usr/local/var/postgres stop -mi --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ 2012/1

[GENERAL] stop server

2012-01-02 Thread roberto sanchez muñoz
how can i stop the server i use this in terminal (pg_ctl -D /usr/local/var/postgres stop -s -m fast) and show this pg_ctl: server does not shut down thanks for your help -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgr

[GENERAL] Duplicated entries are not ignored even if a "do instead nothing" rule is added.

2012-01-02 Thread 邓尧
Hi, I'm new to pgsql, I need the do something like the "INSERT IGNORE" in mysql. After some searching I got a solution, which is adding a "do instead nothing" rule to the corresponding table, but it fails sometimes. The table and the rule is created with the following sql statements: create seque

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 6:21:53 pm Hagen Finley wrote: > Yes but I couldn't input your second line - the ('ä,ß,ö') was not possible > via the psql client - just got beeped when I tried to type or paste those > characters. Hmmm. Have you checked what client_encoding is set to in postgresql.con

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Yes but I couldn't input your second line - the ('ä,ß,ö') was not possible via the psql client - just got beeped when I tried to type or paste those characters. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Monday, January 02, 2012 5:54 PM To: Hagen Finl

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 4:37:18 pm Hagen Finley wrote: > Yes I am running psql on Centos. > > My psql client won't accept the German characters whether or not I attempt > to type them or paste them. > So to be clear did you try?: create table x(a text); insert into x values('ä,ß,ö'); SELECT

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Yes I am running psql on Centos. My psql client won't accept the German characters whether or not I attempt to type them or paste them. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Monday, January 02, 2012 5:05 PM To: Hagen Finley Cc: pgsql-general@postg

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 3:41:40 pm Hagen Finley wrote: > As you indicated UTF-8 has the whole kitchen sink in it. I did trying using > the German Keyboard Layout with a Centos text editor and that works - I > can produce the characters I want. Now I can also get the German > characters to work

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
As you indicated UTF-8 has the whole kitchen sink in it. I did trying using the German Keyboard Layout with a Centos text editor and that works - I can produce the characters I want. Now I can also get the German characters to work in the Centos terminal but not in the psql command line client.

Re: [GENERAL] Verifying a timestamp is null or in the past

2012-01-02 Thread Ondrej Ivanič
Hi 2012/1/3 David Johnston : > On Jan 2, 2012, at 16:46, Ondrej Ivanič wrote: > Yes, PERFORM does populate FOUND. > > From the documentation you just linked to > > A PERFORM statement sets FOUND true if it produces (and discards) one or > more rows, false if no row is produced. > Bummer! Tha

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hannes Erven
Hi Hagen, > gpdemo | gpadmin | UTF8 | > that UTF8 ought to support the German characters I want. > Am I understanding you correctly? Yes, UTF-8 supports all the characters you'd want -- Wikipedia says it's about 109.000 characters from 93 scripts, so that's pretty everything you migh

Re: [GENERAL] Verifying a timestamp is null or in the past

2012-01-02 Thread David Johnston
On Jan 2, 2012, at 16:46, Ondrej Ivanič wrote: > Hi, > > On 2 January 2012 03:26, Raymond O'Donnell wrote: >>> And also - does PERFORM works with FOUND? >> >> Not sure what you mean - can you elaborate? > > No, perform (and execute) doesn't populate 'found' variable: > http://www.postgresql.o

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 1:47:13 pm Hagen Finley wrote: > Hannes, > > The output of \l is: > > gpdemo=# \l >List of databases > Name| Owner | Encoding | Access privileges > +-+--+- > acn| gpadmin |

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Hannes, The output of \l is: gpdemo=# \l List of databases Name| Owner | Encoding | Access privileges +-+--+- acn| gpadmin | UTF8 | gpdemo | gpadmin | UTF8 | philosophy | gpadmin | UT

Re: [GENERAL] Verifying a timestamp is null or in the past

2012-01-02 Thread Ondrej Ivanič
Hi, On 2 January 2012 03:26, Raymond O'Donnell wrote: >> And also - does PERFORM works with FOUND? > > Not sure what you mean - can you elaborate? No, perform (and execute) doesn't populate 'found' variable: http://www.postgresql.org/docs/9.0/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIA

Re: [GENERAL] handling out of memory conditions when fetching row descriptions

2012-01-02 Thread Tom Lane
"'Isidor Zeuner'" writes: > using the latest git source code, I found that libpq will let the > connection stall when getRowDescriptions breaks on an out of memory > condition. I think this should better be handled differently to allow > application code to handle such situations gracefully. The

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 12:25:26 pm Hagen Finley wrote: > Thanks Adrian, > > > > Looks like I am currently using UTF8: > > > > gpdemo=# \encoding > > UTF8 Well that shows the client encoding not the server encoding. For that either do \l or show server_encoding; > > > > And it lo

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hannes Erven
Hagen, > gpdemo=# \encoding > UTF8 UTF8 includes virtually all characters you will need for any purpose on the earth. But: you showed the output of \encoding when you were asked to show \l . There is a subtle difference: \encoding shows the encoding of the connection between psql and the ser

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Pavel Stehule
Hello 2012/1/2 Hagen Finley : > Thanks Adrian, > > > > Looks like I am currently using UTF8: > > > > gpdemo=# \encoding > > UTF8 > > > > And it looks like UTF8 doesn’t include the German characters I seek. Can > someone explain how I can switch to -0FFF which looks like the Basic > Multilingua

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Thanks Adrian, Looks like I am currently using UTF8: gpdemo=# \encoding UTF8 And it looks like UTF8 doesn’t include the German characters I seek. Can someone explain how I can switch to -0FFF which looks like the Basic Multilingual Plane Unicode which does include the characters I

Re: [GENERAL] 9.1.2: Preventing connections / syncing a database

2012-01-02 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Jay Levitt spoke: >>Greg Sabino Mullane wrote: >> update pg_database set datallowconn = false where datname = 'foobar'; >That's perfect - thanks. Now I can (I think) do this: > > pg_restore -d rails_dev_new > [wait] > psql template1 >upda

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On 01/02/2012 11:13 AM, Hagen Finley wrote: Hi, I am using psql (8.2.15) and I would like to input German characters I am going to assume you are using a Postgresql 8.2.15 server(psql is the client program for Postgres, I am being pedantic because it reduces the confusion level:) ) (e.g.

[GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Hi, I am using psql (8.2.15) and I would like to input German characters (e.g. ä,ß,ö) into char fields I have in a database. I am having trouble getting the CENTOS Linux OS I am using to input German characters via a (apparently supported) German Keyboard Layout. However, that might be a separa

[GENERAL] handling out of memory conditions when fetching row descriptions

2012-01-02 Thread 'Isidor Zeuner'
Hi there, using the latest git source code, I found that libpq will let the connection stall when getRowDescriptions breaks on an out of memory condition. I think this should better be handled differently to allow application code to handle such situations gracefully. For now, I changed libpq to

Re: [GENERAL] 9.1.2: Preventing connections / syncing a database

2012-01-02 Thread Jay Levitt
Greg Sabino Mullane wrote: update pg_database set datallowconn = false where datname = 'foobar'; That's perfect - thanks. Now I can (I think) do this: pg_restore -d rails_dev_new [wait] psql template1 update pg_database set datallowconn = false where datname = 'rails_dev'; select pg_termi

Re: [GENERAL] 9.1.2: Preventing connections / syncing a database

2012-01-02 Thread Jay Levitt
Rob Sargentg wrote: > Not clear to me why an > individual dev box needs to be that current data-wise. It's significantly easier to debug a production problem when you can duplicate the problem on your local machine. "Hey, when I go to JennyC's activity page and scroll down three times, I see ou

[GENERAL] asynchronous api questions

2012-01-02 Thread Nulik Nol
Hi, I have 2 questions regarding the asynchronous C api (I am using vers. 8.4): 1) To make a connection in non-blocking manner the api provides PGconn *PQconnectStart(const char *conninfo) function. The parameters are passed in 'conninfo' variable which is a string so I have to use sprintf() to p

Re: [GENERAL] Large Objects and and Vacuum

2012-01-02 Thread Simon Windsor
Hi Thanks for the response. I am new to small IT company that have recently migrated an Oracle based system Postgres. The system stores full XML responses, ranging in size from a few K to over 55MB, and a sub set of key XML fields are stored on a more permanent basis. The database design was thu

[GENERAL] Re: [partition table] python fetchall or fetchone function can not get the returning rows

2012-01-02 Thread Jasen Betts
On 2011-12-21, Xiaoning Xu wrote: > Hello, > > I have a problem concerning the partition table. > When I store a record into one of the partition and use "RETURNING table_id" > or "RETURNING *", > I expect the same result when calling fetchall or fetchone function as not > using partition. > How

Re: [GENERAL] Large Objects and and Vacuum

2012-01-02 Thread John R Pierce
On 12/30/11 3:54 PM, Simon Windsor wrote: I am struggling with the volume and number of XML files a new application is storing. how big are these XML files? large_object was meant for storing very large files, like videos, etc. multi-megabyte to gigabytes. XML stuff is typically a lot sma

Re: [GENERAL] Large Objects and and Vacuum

2012-01-02 Thread Alban Hertroys
On 31 December 2011 00:54, Simon Windsor wrote: > I am struggling with the volume and number of XML files a new application is > storing. The table pg_largeobjects is growing fast, and despite the efforts > of vacuumlo, vacuum and auto-vacuum it keeps on growing in size I can't help but wonder wh

Re: [GENERAL] Would whoever is at "Hi-Tech Gears Ltd, Gurgaon, India" fix their mailer?

2012-01-02 Thread Chetan Suttraway
On Sat, Dec 31, 2011 at 12:04 AM, Tom Lane wrote: > Whoever you are, you are forging Devrim Gunduz's name to "signed" > reposts of all his posts in pgsql-general. This is at best impolite to > Devrim, and it's annoying everybody else. If it continues I will see > to it that you get removed from

Re: [GENERAL] Large Objects and and Vacuum

2012-01-02 Thread Albe Laurenz
Please don't send HTML mail to this list. Simon Windsor wrote: > I am struggling with the volume and number of XML files a new application is storing. The table > pg_largeobjects is growing fast, and despite the efforts of vacuumlo, vacuum and auto-vacuum it keeps > on growing in size. Have you c