Re: Singleton table (was Re: [GENERAL] How to don't update sequence on rollback of a transaction)

2012-08-02 Thread Craig Ringer
On 08/03/2012 12:07 PM, Chris Angelico wrote: On Fri, Aug 3, 2012 at 10:00 AM, Craig Ringer wrote: -- PostgreSQL specific hack you can use to make -- really sure only one row ever exists CREATE UNIQUE INDEX there_can_be_only_one ON invoice_number( (1) ); This will guarantee that there's only o

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-02 Thread Craig Ringer
On 08/02/2012 11:08 PM, Frank Lanitz wrote: Hi folks, I did a test with transactions and wondered about an behavior I didn't expected. At http://pastebin.geany.org/bYQNo/raw/ I posted a complete backlog for. To make it short: I created a table with a serial and started a transactions. After thi

Re: [GENERAL] Error: [Custom Archiver]: Out of memory

2012-08-02 Thread John R Pierce
On 08/02/12 12:25 PM, Edison So wrote: Hello all, Can someone please help me how to resolve the error "[Custom Archiver]: Out of memory" during a restore in a Windows server 2008 running Postgresql 9.0? Thanks in advance. 9.0.what? enterpriseDB's oneclick installer version of postgres,

[GENERAL] Error: [Custom Archiver]: Out of memory

2012-08-02 Thread Edison So
Hello all, Can someone please help me how to resolve the error "[Custom Archiver]: Out of memory" during a restore in a Windows server 2008 running Postgresql 9.0? Thanks in advance. -- Edison

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-02 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Condor > Sent: Thursday, August 02, 2012 4:35 AM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Need help with SQL query and finding NULL > array_agg > >

Re: [GENERAL] The semantics of (NULL,NULL) vs NULL

2012-08-02 Thread Kevin Grittner
Ingmar Brouns wrote: > Can anyone explain why: When it comes to record types, IS NULL is defined to mean "there is no record or all elements of the record are null". NOT NULL is defined to mean that *all elements* of the record are not null. -Kevin -- Sent via pgsql-general mailing list (

Re: [GENERAL] The semantics of (NULL,NULL) vs NULL

2012-08-02 Thread Peter Geoghegan
On 2 August 2012 17:47, Ingmar Brouns wrote: > As I noted that (null,null) is null, I thought why put (null,null) in an > array when that is the same as putting null in there. > However, when trying to unnest that array I got an error when using null > instead of the tuple. I experimented a bit, a

[GENERAL] The semantics of (NULL,NULL) vs NULL

2012-08-02 Thread Ingmar Brouns
Hi, I have a question. As I noted that (null,null) is null, I thought why put (null,null) in an array when that is the same as putting null in there. However, when trying to unnest that array I got an error when using null instead of the tuple. I experimented a bit, and read the documentation on

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-02 Thread Chris Angelico
On Fri, Aug 3, 2012 at 1:08 AM, Frank Lanitz wrote: > My understanding of all was that it includes sequences. Obviously, I'm > wrong... but how to do it right? Sequences are fast and lock-free, but don't guarantee absence of gaps. Quite a few things can unexpectedly advance a sequence (including

Re: [GENERAL] "seeking help to collect some postgres meta data"

2012-08-02 Thread Bruce Momjian
On Thu, Aug 2, 2012 at 12:09:30PM +0530, mithun wrote: > Dear Sir, > > We are gathering information regarding PostgreSQL open source working model > for a presentation. Can you kindly provide me some information regarding > > 1. How to communicate with PostgreSQL core team members. And

[GENERAL] "seeking help to collect some postgres meta data"

2012-08-02 Thread mithun
Dear Sir, We are gathering information regarding PostgreSQL open source working model for a presentation. Can you kindly provide me some information regarding 1. How to communicate with PostgreSQL core team members. And how core team members communicate with each other is there any speci

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-02 Thread Andrew Hastie
Hi Frank, I believe this is by design. See the bottom of the documentation on sequences where it states ;- "*Important:* To avoid blocking concurrent transactions that obtain numbers from the same sequence, a |nextval| operation is never rolled back; that is, once a value has been fetched it

[GENERAL] How to don't update sequence on rollback of a transaction

2012-08-02 Thread Frank Lanitz
Hi folks, I did a test with transactions and wondered about an behavior I didn't expected. At http://pastebin.geany.org/bYQNo/raw/ I posted a complete backlog for. To make it short: I created a table with a serial and started a transactions. After this I was inserting values into the table but di

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-08-02 Thread Sergey Konoplev
Hi Brian, On Wed, Aug 1, 2012 at 10:21 PM, Brian McNally wrote: > I was able to upgrade Postgres to 9.0.8 today and the ALTER TABLE... command > still hangs. Stracing the hung PID doesn't reveal much: > > [root@gvsdb-dev ~]# strace -fp 13107 > Process 13107 attached - interrupt to quit > semop(84

Re: [GENERAL] Threads With Libpq

2012-08-02 Thread dinesh kumar
Hi All .. It seems Semaphores satisfied my conditions ... Below is the modified behaviour ... Connection_To_PG() { /* Making a connection to PG 9.0 */ } void* Independent_Thread1() { while(1) { sleep(5); /* Doing 1 Insert Operation on Table A*/ *sem_post(&Flag);* } } void* Independent_Thread2()

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-02 Thread Condor
On 2012-08-01 23:59, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Wednesday, August 01, 2012 4:16 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Need help with SQL query and

Re: [GENERAL] Threads With Libpq Issue

2012-08-02 Thread dinesh kumar
Thanks Craig/Reid .. Yes it was duplicated ... Sorry Regards, Dinesh On Thu, Aug 2, 2012 at 6:20 AM, Craig Ringer wrote: > Argh, disregard. Your post was duplicated, and this copy only just reached > me. >