Re: [GENERAL] PickSplit method of 2 columns ... error

2012-02-29 Thread Tim Wilson
Did this change to gistsplit.c to reduce the logging from LOG down to DEBUG1 ever done? -- Tim Wilson Lead DB Engineer - Telogis www.telogis.com www.telogis.co.nz +1 201 477-1448 (USA) +64 3 339-2825 (NZ) *One Platform for Location Intelligence* — This e-mail, and any attachments, is intended

Re: [GENERAL] Re: One transaction by connection - commit subdetails without release master transaction?

2012-02-29 Thread Ben Chobot
On Feb 29, 2012, at 3:00 PM, Alban Hertroys wrote: > On 29 Feb 2012, at 20:44, Ben Chobot wrote: > >>> As I see the PGSQL supports one transaction per connection. Is this >>> information ok? >> >> Yes, in postgres a connection can support only one transaction. > > > A small correction: a conne

Re: [GENERAL] Re: One transaction by connection - commit subdetails without release master transaction?

2012-02-29 Thread Alban Hertroys
On 29 Feb 2012, at 20:44, Ben Chobot wrote: >> As I see the PGSQL supports one transaction per connection. Is this >> information ok? > > Yes, in postgres a connection can support only one transaction. A small correction: a connection can support only one transaction _simultaneously_. You can

Re: [GENERAL] Valid Input Syntax for Type DATE

2012-02-29 Thread Rich Shepard
On Wed, 29 Feb 2012, Andrew Gould wrote: If the column is null'able, I think you can use the keyword: DEFAULT insert into(id, xdate) values (1, DEFAULT); Or... use NULL: insert into(id, xdate) values (1, NULL); NULL works, but one advantage of using DEFAULT is that you won't have to worry

Re: [GENERAL] Re: One transaction by connection - commit subdetails without release master transaction?

2012-02-29 Thread Ben Chobot
On Feb 29, 2012, at 4:11 AM, Durumdara wrote: > Dear Anybody! > > I replace the long question to some shorter: > > As I see the PGSQL supports one transaction per connection. Is this > information ok? Yes, in postgres a connection can support only one transaction. If you wish to reduce the num

Re: [GENERAL] Privilege on schema 'public' not revokable

2012-02-29 Thread Tom Lane
"David Johnston" writes: > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Vincent de Phily >> [ this doesn't do anything: ] >> db_foo=# REVOKE CREATE ON SCHEMA public FROM foouser; > "foouser" is obtaining its permission to "CREATE" on the "public " schema > via global/PUBLIC permission

Re: [GENERAL] Calling Functions With OUT paramaters

2012-02-29 Thread Raymond O'Donnell
On 29/02/2012 15:51, David Greco wrote: > I have a function definited as such: > > CREATE OR REPLACE FUNCTION address_pkg.parse_zip(IN cpostal character > varying, OUT czip character varying, OUT czip4 character varying) > LANGUAGE plpgsql; > > How does one call this from another plpgsql function

Re: [GENERAL] Privilege on schema 'public' not revokable

2012-02-29 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Vincent de Phily Sent: Wednesday, February 29, 2012 1:57 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Privilege on schema 'public' not revokable Hi, after having been locked-out of

[GENERAL] Privilege on schema 'public' not revokable

2012-02-29 Thread Vincent de Phily
Hi, after having been locked-out of the public schema by mistake (which I fixed with "GRANT ALL ON SCHEMA public TO 'foobar'"), I wanted to update my privilege-check script to take the schema into account, but I'm running into the following behaviour : > $ psql db_foo > psql (9.1.2) > Type "he

Re: [GENERAL] Valid Input Syntax for Type DATE

2012-02-29 Thread Andrew Gould
On Wed, Feb 29, 2012 at 12:29 PM, Andy Colson wrote: > On 2/29/2012 12:28 PM, Andy Colson wrote: >> >> On 2/29/2012 11:49 AM, Rich Shepard wrote: >>> >>> I'm trying to insert rows into a table, but some date and time columns >>> are >>> missing values. In the INSERT INTO ... statements of the .sql

Re: [GENERAL] Valid Input Syntax for Type DATE

2012-02-29 Thread Andy Colson
On 2/29/2012 12:28 PM, Andy Colson wrote: On 2/29/2012 11:49 AM, Rich Shepard wrote: I'm trying to insert rows into a table, but some date and time columns are missing values. In the INSERT INTO ... statements of the .sql file I've tried various formats: ,, and ,'', and ,' ', but they all genera

Re: [GENERAL] Valid Input Syntax for Type DATE

2012-02-29 Thread Andy Colson
On 2/29/2012 11:49 AM, Rich Shepard wrote: I'm trying to insert rows into a table, but some date and time columns are missing values. In the INSERT INTO ... statements of the .sql file I've tried various formats: ,, and ,'', and ,' ', but they all generate the error of invalid syntax for type dat

Re: [GENERAL] accumulating handles problem on machine running postgresql

2012-02-29 Thread dennis jenkins
On Wed, Feb 29, 2012 at 8:54 AM, Adam Bruss wrote: > I ran process explorer and looked at the handles for the System process. The > vast majority of the handles are of type "Key". I can find them in the > registry. I took two at random from process explorer and exported the > registry branch fo

Re: [GENERAL] what Linux to run

2012-02-29 Thread Scott Marlowe
On Wed, Feb 29, 2012 at 10:05 AM, Gary Chambers wrote: >> I've been running 10.04 LTS Server for over three years (on a Dell >> PowerEdge >> 2850) using Martin Pitt's PostgreSQL 9.1 PPA. > > > I apologize.  That's over two years. Darnit! I was hoping to borrow your time machine too. :) -- Sen

[GENERAL] Valid Input Syntax for Type DATE

2012-02-29 Thread Rich Shepard
I'm trying to insert rows into a table, but some date and time columns are missing values. In the INSERT INTO ... statements of the .sql file I've tried various formats: ,, and ,'', and ,' ', but they all generate the error of invalid syntax for type date. When I have missing date of the date

[GENERAL] PQputCopyData buffer limit

2012-02-29 Thread sujayr06
Hello All, My CPP Application uses PQputCopyData to push the read buffer from a file into PostGreSql. According to dummy tests conducted, PQputCopyData has been able to upload Approx 9-10MB of data to PostGreSql at one shot. Can someone throw light as to the maxi

Re: [GENERAL] what Linux to run

2012-02-29 Thread Gary Chambers
I've been running 10.04 LTS Server for over three years (on a Dell PowerEdge 2850) using Martin Pitt's PostgreSQL 9.1 PPA. I apologize. That's over two years. -- G. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

[GENERAL] "invalid memory alloc request size" + "Could not open file "pg_clog/XXXX"

2012-02-29 Thread scheu_postgresql
Hi In my Postgresql 8.4.0 server, since this morning some tables are unavailable, see example below : --> pg_dump MY_DB > bkp_MY_DB.dmp pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: The command was: COPY . (

Re: [GENERAL] archive_cleanup_command recovery.conf Standby server error

2012-02-29 Thread Adrian Klaver
On 02/29/2012 04:40 AM, chinnaobi wrote: Hi Adrian, The pg_archivecleanup.exe is already installed with postgresql 9.1, it is under bin folder. I tried manually to run the command pg_archivecleanup.exe 10.1.18.16\\DB_Stream_Share\\ %r -- it didnt recognize the path When using pg_archivecle

Re: [GENERAL] archive_cleanup_command recovery.conf Standby server error

2012-02-29 Thread chinnaobi
Dear Dhaval, I tried as you told as below archive_cleanup_command='c:\\Program files\\postgresql\\9.1\\pg_archivecleanup.exe 10.1.18.16\\DB_Stream_Share\\ %r' this didnt work gave a error in the log file. -- View this message in context: http://postgresql.1045698.n5.nabble.com/archive-cle

Re: [GENERAL] Client encoding not the same as the db encoding

2012-02-29 Thread Adrian Klaver
On 02/29/2012 07:50 AM, Tom Lane wrote: Adrian Klaver writes: On Wednesday, February 29, 2012 6:47:21 am Clodoaldo Neto wrote: In 9.1.3 the client encoding is not defaulting to the db encoding: What am i missing? Regards, Clodoaldo My guess this: http://www.postgresql.org/docs/9.1/interacti

Re: [GENERAL] version controlling postgresql code

2012-02-29 Thread akp geek
Thanks all. We will stick with CVS then. Thanks again On Tue, Feb 28, 2012 at 3:36 PM, Greg Williamson wrote: > akp geek asked: > > > > > Would like to know if any one of you have used CVS or some other > version controlling tools to version the postgres code? Any > recommendations? Appr

Re: [GENERAL] what Linux to run

2012-02-29 Thread Gary Chambers
Note that Ubuntu also comes in a GUI free server edition as well. I can definitely state that Ubuntu 10.04 LTS Server edition is rock solid stable +1 I've been running 10.04 LTS Server for over three years (on a Dell PowerEdge 2850) using Martin Pitt's PostgreSQL 9.1 PPA. -- Gary Chambers --

Re: [GENERAL] archive_cleanup_command recovery.conf Standby server error

2012-02-29 Thread dhaval jaiswal
Try to give the full path of pg_archivecleanup.exe e.g: archive_cleanup_command = '/usr/local/pgsql/bin/pg_archivecleanup %r' > Date: Wed, 29 Feb 2012 04:40:17 -0800 > From: chinna...@gmail.com > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] archive_cleanup_command recovery.conf S

[GENERAL] Arbitrary and mixed data types in function

2012-02-29 Thread McGehee, Robert
Hello, I'd like to write a generalized function that accepts arguments of all type without producing an error if types do not match across arguments. As an example, I've written a simple function below called 'bound' (below) that returns a value 'x' bounded by the range [lo, hi]. The function w

[GENERAL] Calling Functions With OUT paramaters

2012-02-29 Thread David Greco
I have a function definited as such: CREATE OR REPLACE FUNCTION address_pkg.parse_zip(IN cpostal character varying, OUT czip character varying, OUT czip4 character varying) LANGUAGE plpgsql; How does one call this from another plpgsql function? Currently, I am using something of the form: SEL

Re: [GENERAL] Client encoding not the same as the db encoding

2012-02-29 Thread Tom Lane
Adrian Klaver writes: > On Wednesday, February 29, 2012 6:47:21 am Clodoaldo Neto wrote: >> In 9.1.3 the client encoding is not defaulting to the db encoding: >> What am i missing? Regards, Clodoaldo > My guess this: > http://www.postgresql.org/docs/9.1/interactive/release-9-1.html > "E.4.3.10.1.

[GENERAL] Easy way to corrupt a standby database

2012-02-29 Thread Chris Travers
Step one: Set up streaming replication Step two: Promote replica to full database Step three: Set up the database as a replica again Now I understand this is well known but it is pretty easy to do. What I am wondering is whether there is an easy way to prevent this from occurring in the future

Re: [GENERAL] Client encoding not the same as the db encoding

2012-02-29 Thread Adrian Klaver
On Wednesday, February 29, 2012 6:47:21 am Clodoaldo Neto wrote: > In 9.1.3 the client encoding is not defaulting to the db encoding: > > postgresql.conf: > > #client_encoding = sql_ascii > > => show server_encoding; > server_encoding > - > SQL_ASCII > > => show client_encodin

Re: [GENERAL] accumulating handles problem on machine running postgresql

2012-02-29 Thread Adam Bruss
I ran process explorer and looked at the handles for the System process. The vast majority of the handles are of type "Key". I can find them in the registry. I took two at random from process explorer and exported the registry branch for them below. ## EXAMPLE 1: ## Key Name: HKEY_C

[GENERAL] Client encoding not the same as the db encoding

2012-02-29 Thread Clodoaldo Neto
In 9.1.3 the client encoding is not defaulting to the db encoding: postgresql.conf: #client_encoding = sql_ascii => show server_encoding; server_encoding - SQL_ASCII => show client_encoding; client_encoding - UTF8 In 9.0 the client encoding defaults to the d

Re: [GENERAL] archive_cleanup_command recovery.conf Standby server error

2012-02-29 Thread chinnaobi
Hi Adrian, The pg_archivecleanup.exe is already installed with postgresql 9.1, it is under bin folder. I tried manually to run the command pg_archivecleanup.exe 10.1.18.16\\DB_Stream_Share\\ %r -- it didnt recognize the path pg_archivecleanup.exe \\10.1.18.16\DB_Stream_Share\ %r --it didnt rec

[GENERAL] Re: One transaction by connection - commit subdetails without release master transaction?

2012-02-29 Thread Durumdara
Dear Anybody! I replace the long question to some shorter: As I see the PGSQL supports one transaction per connection. Is this information ok? Formerly I believed that only Zeos/PGDAC supports one trs/conn, but now it seems to be based on the server, and not the components... (The pgadmin is als

Re: [GENERAL] Error installing postgresq91-python package

2012-02-29 Thread Clodoaldo Neto
Em 28 de fevereiro de 2012 17:54, Devrim GÜNDÜZ escreveu: > > Hi, > > On Tue, 2012-02-28 at 10:33 -0300, Clodoaldo Neto wrote: > > > > > Transaction Check Error: > > file /usr/lib64/python2.6/site-packages/_pg.so from install of > > postgresql91-python-0:4.0-2PGDG.rhel6.x86_64 conflicts with fi

Re: [GENERAL] Error installing plpythonu in 9.1

2012-02-29 Thread Clodoaldo Neto
Em 28 de fevereiro de 2012 17:48, Devrim GÜNDÜZ escreveu: > > Hi, > > On Tue, 2012-02-28 at 17:39 -0300, Clodoaldo Neto wrote: > > template1=# create extension plpythonu; > > ERROR: could not open extension control file > > "/usr/pgsql-9.1/share/extension/plpythonu.control": No such file or > > d

Re: [GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-29 Thread Filip Rembiałkowski
On Wed, Feb 29, 2012 at 8:18 AM, Durumdara wrote: > 2012/2/28 Filip Rembiałkowski : >> A way to force error when any statement takes more than 200 msec: >> SET statement_timeout TO '200ms'; > > As I see that is not needed here. > Only for normal updates. > > And how I can "reset" statement_timeo

Re: [GENERAL] Yearly date comparison?

2012-02-29 Thread Albe Laurenz
Nick wrote: > What is the best way to find an event with a yearly occurrence? > > CREATE TABLE events ( > start_date DATE, > end_date DATE, > recurring TEXT > ); > INSERT INTO events (start_date, end_date, recurring) VALUES > ('2010-02-28','2010-03-01','yearly'); > > SELECT * FROM eve

Re: [GENERAL] what Linux to run

2012-02-29 Thread Chris Angelico
On Wed, Feb 29, 2012 at 3:58 PM, Scott Marlowe wrote: > Note that Ubuntu also comes in a GUI free server edition as well.  I > can definitely state that Ubuntu 10.04 LTS Server edition is rock > solid stable for the hardware I've run it on (48 core AMD and 40 core > Intel machines with LSI, Arecam

[GENERAL] debugging postgres server memory checker

2012-02-29 Thread Dave Potts
hi List, As a result of writing a C 'postgres' function, I have a memory corruption problem. Something is either being free twice or I am accessing beyond the data structure and corrupting the malloc/free/sbrk memory pool. My attempts to memory support in glibc, that been stopped because someth