Re: [GENERAL] processing large amount of rows with plpgsql

2012-08-08 Thread Geert Mak
On 08.08.2012, at 22:04, Merlin Moncure wrote: > What is the general structure of the procedure? In particular, how > are you browsing and updating the rows? Here it is - BEGIN for statistics_row in SELECT * FROM statistics ORDER BY time ASC LOOP ... ... here some very minimal trans

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

2012-08-08 Thread Tom Lane
Brian McNally writes: > Ok, I'm running with all available updates and kernel 2.6.18-308.4.1.el5 > but am still having the same problem. It's fairly clearly blocked on a lock ... have you looked into the pg_locks view to see what is holding the lock? (I'm wondering about a prepared transaction,

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

2012-08-08 Thread Brian McNally
Ok, I'm running with all available updates and kernel 2.6.18-308.4.1.el5 but am still having the same problem. -- Brian McNally On 08/07/2012 05:29 PM, Sergey Konoplev wrote: On Wed, Aug 8, 2012 at 4:27 AM, Brian McNally wrote: RHEL 5.7 on both. 2.6.18-274.el5 on the system that works, 2.6.1

[GENERAL] postgresql service stoped

2012-08-08 Thread Fanbin Meng
I installed postgresql-9.1 in windowsXP. The service "postgresql-9.1" stoped and could not start when computer shut down by accident. In task manager, exist one or more "postgres.exe" process. The service "postgresql-9.1" can start after stop all the "postgres.exe" process. Thanks, Fanbin

Re: [GENERAL] processing large amount of rows with plpgsql

2012-08-08 Thread Merlin Moncure
On Wed, Aug 8, 2012 at 2:41 PM, Geert Mak wrote: > hello everybody, > > we are trying to move the data from table1 into table2 using a plpgsql stored > procedure which is performing simple a data conversion > > there are about 50 million rows > > the tables are relatively simple, less than a doze

[GENERAL] processing large amount of rows with plpgsql

2012-08-08 Thread Geert Mak
hello everybody, we are trying to move the data from table1 into table2 using a plpgsql stored procedure which is performing simple a data conversion there are about 50 million rows the tables are relatively simple, less than a dozen columns, most are integer, a couple are char(32) and one is

Re: [GENERAL] timestamp with timezone and time zone name

2012-08-08 Thread Steve Crawford
On 08/07/2012 08:36 PM, Shridhar Daithankar wrote: On Tuesday 07 Aug 2012 12:21:04 AM Tom Lane wrote: > Shridhar Daithankar writes: > > I am wondering, why following two values result in a shift by 3.5 hours. I > > would expect them to be identical. > > > > I understand that canonical ti

Re: [GENERAL] File system level backup

2012-08-08 Thread Kevin Grittner
"Manoj Agarwal" wrote: > From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] >> "Manoj Agarwal" wrote: >>> I need to transfer the database from one machine to other. >>> Both machines contain a database with the same name, for >>> example: testdb, but with different data/values, but the

Re: [GENERAL] Using contains operator on arrays that have duplicate elements: feedback request.

2012-08-08 Thread Seref Arikan
Thanks a lot David, You are right, I want to left to be a superset (or equal at the limit) of the right set, but taking cardinalities of elements into account. Please do not spend time on this, since it appears I can't keep the indexing advantage of array operation under these circumstances. Actua

Re: [GENERAL] Using contains operator on arrays that have duplicate elements: feedback request.

2012-08-08 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Seref Arikan Sent: Wednesday, August 08, 2012 10:35 AM To: PG-General Mailing List Subject: [GENERAL] Using contains operator on arrays that have duplicate elements: feedback request. Greetings, I've

[GENERAL] Using contains operator on arrays that have duplicate elements: feedback request.

2012-08-08 Thread Seref Arikan
Greetings, I've been trying to use contains operator on an array such as {3,4,9,4,5} My problem is, I'd like to get rows that has two 4s in them, and contains operator seems to work separately for each member of the right operand. Therefore select '{3,4,9,4,5}'::int[] @> '{4,4,4}' returns true.

Fwd: Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Michael Trausch
This was supposed to go to the list. Sorry. -- Forwarded message -- From: "Michael Trausch" Date: Aug 8, 2012 10:12 AM Subject: Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY? To: "Albe Laurenz" There is root in accounting for this type of view of the inte

Re: [GENERAL] warnings about invalid "search_path"

2012-08-08 Thread Samba
Thanks Scott, I'll try that out; I hope this would solve my problem... Regards, Samba On Tue, Aug 7, 2012 at 8:30 PM, Scott Marlowe wrote: > On Tue, Aug 7, 2012 at 7:15 AM, Samba wrote: > > Thanks Gabriele for those pointers, > > > >

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Craig Ringer
On 08/08/2012 08:56 PM, Albe Laurenz wrote: Hmmm. How would you define an ordering in that case? And without an ordering, you couldn't use "btree" indexes on interval columns, right? Or, as Anthony noted, what about leap seconds? I'm not advocating changing the behaviour of interval types. Th

[GENERAL] pgAgent job keeps running

2012-08-08 Thread mwkhan
Hi, I have successfully installed pgagent and scheduled the pgagent job in pgadmin (on both windows and linux - ubunut 10.04). However, i experience two different behaviors in windows and linux (none of which is expected and correct). The job is the simple insert SQL statement (for testing). in

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Albe Laurenz
Craig Ringer wrote: >> Of course this is not always correct. >> But what should the result of >>INTERVAL '1 month' = INTERVAL '30 days' >> be? FALSE would be just as wrong. > NULL? In all honesty, it's a reasonable fit for NULL in its > "uncertain/unknowable" personality, because two interva

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Albe Laurenz
Dmitry Koterov wrote: >>> I've just discovered a very strange thing: >>> >>> SELECT '1 mon'::interval = '30 days'::interval --> TRUE??? >> Intervals are internally stored in three fields: months, days >> and microseconds. A year has 12 months. > >> PostgreSQL converts intervals into microsecond

Re: [GENERAL] File system level backup

2012-08-08 Thread Manoj Agarwal
Hi, I have two identical Centos 4.6 Virtual machines with postgresql database from different customers. Can't I swap the databases between these two machines using file level copy, without requiring pg_dump and pg_restore? I don't wish to use file system level copy for individual database in a c

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Anthony
Should now plus 157785000 seconds in text be NULL, because we don't know how many "leap seconds" will be added? -- 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] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Craig Ringer
On 08/08/2012 05:54 PM, Albe Laurenz wrote: Of course this is not always correct. But what should the result of INTERVAL '1 month' = INTERVAL '30 days' be? FALSE would be just as wrong. NULL? In all honesty, it's a reasonable fit for NULL in its "uncertain/unknowable" personality, because

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Dmitry Koterov
Of course NOT. '1 mon' and '30 days' have different meaning. So they should not be equal. I understand that conversion to seconds is a more or less correct way to compare intervals with ">" and "<". But equality is not the same as ordering (e.g. equality is typically used in JOINs and unique indi

Re: [GENERAL] postgis and pgpool

2012-08-08 Thread gwainer
Hello, What PostGIS functions that modify data are you guys talking about? I'm new to PostGIS, and looking for advice when using it with PgPool for replication. I wonder if you know of any documentation about it. Thanks in advance, Gabriel Szymon Guz-2 wrote > > On 19 September 2011 16:17, Tats

Re: [GENERAL] Interval "1 month" is equals to interval "30 days" - WHY?

2012-08-08 Thread Albe Laurenz
Dmitry Koterov wrote: >> I've just discovered a very strange thing: >> >> SELECT '1 mon'::interval = '30 days'::interval --> TRUE??? >> >> This returns TRUE (also affected when I create an unique index using an >> interval column). Why? >> >> I know that Postgres stores monthes, days and seconds

Re: [GENERAL] Installation faillure version 8.4.12

2012-08-08 Thread John R Pierce
On 08/07/12 9:48 AM, Segato Luca wrote: We try to install, several times, postgres version 8.4.12, each installation was failed during the “post-install step ” displaying this error: (install-postgresql.log) what OS version? 32 or 64bit? f: is a local disk and not a network share? (storin

[GENERAL] Installation faillure version 8.4.12

2012-08-08 Thread Segato Luca
Dear All We try to install, several times, postgres version 8.4.12, each installation was failed during the "post-install step " displaying this error: (install-postgresql.log) Executing cscript //NoLogo "F:\postgressql/installer/server/initcluster.vbs" "postgres" "postgres" "" "F:\post

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

2012-08-08 Thread Brian McNally
It took me a little while but here it is. Let me know if this is helpful or not. I'm not sure if I need more -debuginfo packages installed: === [root@gvsdb-dev tmp]# gdb /usr/pgsql-9.0/bin/postmaster 1160 GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5_6.2) Copyright (C) 2009 Free Software