[GENERAL] Which is faster: md5() or hashtext()?

2010-11-05 Thread Henry C.
G'day, I need to do a mass update on about 550 million rows (I will be breaking it up into chunks based on id value so I can monitor progress). Hashing one of the columns is part of the process and I was wondering which is more efficient/faster: md5() or hashtext()? hashtext() produces a nice

Re: [GENERAL] Which is faster: md5() or hashtext()?

2010-11-05 Thread Grzegorz Jaśkiewicz
Timing is on. psql (9.1devel) Type help for help. # select count(hashtext(a::text)) FROM generate_series(1,1) a; count --- 1 (1 row) Time: 106.637 ms # select count(hashtext(a::text)) FROM generate_series(1,100) a; count - 100 (1 row) Time: 770.823 ms # select

[GENERAL] Cloning database without dump/restore

2010-11-05 Thread Andrus
Only port 5432 is opened in server. Database can cloned using pg_dup / pg_restore If server is located in internet this requires huge amount of time and bandwidth. How to clone database fast ? How to create server side pl/pgsql script which use code like in pg_dump/pg_restore and or in

Re: [GENERAL] Cloning database without dump/restore

2010-11-05 Thread Grzegorz Jaśkiewicz
read documentation on backups. -- 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] Which is faster: md5() or hashtext()?

2010-11-05 Thread Henry C.
On Fri, November 5, 2010 09:52, Grzegorz Jaśkiewicz wrote: Timing is on. I would say hashtext is consequently beating md5 in terms of performance here. nice concise answer, thanks Grzegorz. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Please Help...

2010-11-05 Thread Craig Ringer
On 04/11/10 16:58, Gavin Burrows wrote: I have literally been researching this for weeks! Now I feel I have reached a point where this has become an impossible task so I need help from the experts please :] It sounds like you have Group Policy restrictions on password strength in place. You

Re: [GENERAL] Installing PostgreSQL on Windows 7 64-bit system

2010-11-05 Thread Craig Ringer
On 05/11/10 00:50, Christopher Farah wrote: Hi, I've read through numerous forums http://forums.enterprisedb.com/posts/list/2328.page to get past the following error An error occurred executing the Microsoft VC++ runtime installer. As far as I can tell, the error can arise if user

[GENERAL] Problem with frequent crashes related to semctl

2010-11-05 Thread Adrian Maier
Hello ! I am running PostgreSQL 8.3.5 on a linux machine (Ubuntu 10.04). Sometimes it happens that connecting to the database fails with error : FATAL: semctl(360458, 3, SETVAL, 0) failed: Invalid argument (PGError) If i restart postgres the problem gets fixed. It doesn't matter how do i

Re: [GENERAL] Cloning database without dump/restore

2010-11-05 Thread Andreas Schmitz
snapshot might be the keyword you're looking for. regards andreas On 11/05/2010 09:06 AM, Andrus wrote: Only port 5432 is opened in server. Database can cloned using pg_dup / pg_restore If server is located in internet this requires huge amount of time and bandwidth. How to clone

Re: [GENERAL] Problem with frequent crashes related to semctl

2010-11-05 Thread Tom Lane
Adrian Maier adrian.ma...@thalesgroup.com writes: I am running PostgreSQL 8.3.5 on a linux machine (Ubuntu 10.04). Sometimes it happens that connecting to the database fails with error : FATAL: semctl(360458, 3, SETVAL, 0) failed: Invalid argument (PGError) If i restart postgres the

Re: [GENERAL] Linux

2010-11-05 Thread David Siebert
I would say that if you pick any of the big four you will be fine. CentOS Ubuntu Server LTS Red Hat Suse Debian can also be a good choice. We used to be an OpenSuse shop but we are now moving everything to Ubuntu Server LTS. I can not say enough good things about CentOS as far as stability and

[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22
Hello there, I am a total novice to Postgresql, but very much interested in learning how it works. I have to modify the source code of Postgresql-9.0.1 such that whenever I run an UPDATE command it should print out the old and new tuples. Since I am a beginner I would appreciate it a lot if

[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22
Hello there, I am a total novice to Postgresql, but very much interested in learning how it works. I have to modify the source code of Postgresql-9.0.1 such that whenever I run an UPDATE command it should print out the old and new tuples. Since I am a beginner I would appreciate it a lot if

[GENERAL] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
Hi, I've got a problem with a query run on production system. We've got some data export in a serializable transaction, and, 2 days ago, someone ran a DDL ( alter table foo add column ba test default 'blabla'), and then, the data export is empty. I try to reproduce the scenario below : begin ;

Re: [GENERAL] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
On 11/05/2010 04:28 PM, Sébastien Lardière wrote: Hi, I've got a problem with a query run on production system. We've got some data export in a serializable transaction, and, 2 days ago, someone ran a DDL ( alter table foo add column ba test default 'blabla'), and then, the data export is

Re: [GENERAL] Cloning database without dump/restore

2010-11-05 Thread John R Pierce
On 11/05/10 1:06 AM, Andrus wrote: Only port 5432 is opened in server. Database can cloned using pg_dup / pg_restore If server is located in internet this requires huge amount of time and bandwidth. you can't log onto the server, no ssh? thats a harsh constraint. moving the data to

Re: [GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread Raymond O'Donnell
On 05/11/2010 11:17, rmd22 wrote: Hello there, I am a total novice to Postgresql, but very much interested in learning how it works. I have to modify the source code of Postgresql-9.0.1 such that whenever I run an UPDATE command it should print out the old and new tuples. Since I am a

Re: [GENERAL] Alter Table + Default Value + Serializable

2010-11-05 Thread Tom Lane
=?ISO-8859-1?Q?S=E9bastien_Lardi=E8re?= slardi...@hi-media.com writes: I've got a problem with a query run on production system. We've got some data export in a serializable transaction, and, 2 days ago, someone ran a DDL ( alter table foo add column ba test default 'blabla'), and then, the

Re: [GENERAL] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
On 11/05/2010 05:19 PM, Tom Lane wrote: and even if it does, the likely behavior would be that the serializable transaction would fail outright rather than give you a surprising view of the table. thanks for your answer, I have to say that I would prefer an error in the serializable

[GENERAL] update one table from multiple tables postgres

2010-11-05 Thread akp geek
Hi All - I need to update one table with the data from multiple tables. 1. I have created a trigger on a table table 2. Create a view with all the logic 3. created a trigger funtion. with in the function, I have tried to populate the

[GENERAL] PITR on different machine/architecture?

2010-11-05 Thread Andreas Brandl
Hi, we are implementing archiving/PITR for a postgresql instance operating on OpenBSD/64-bit. Is it possible to restore the backup on a completely different machine (i.e. other OS/32-bit)? What about restoring on (slightly) different versions of postgresql? Thanks! Best regards, Andreas

[GENERAL] experience with tags schemas

2010-11-05 Thread Matthieu Huin
Greetings, Does anyone here have any experience with tags schemas on postgresql ? I am struggling with a schema inspired by scuttle described here : http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html Performances drop dramatically when the data set increases. Is it normal

Re: [GENERAL] PITR on different machine/architecture?

2010-11-05 Thread Vick Khera
On Fri, Nov 5, 2010 at 1:54 PM, Andreas Brandl m...@andreas-brandl.de wrote: we are implementing archiving/PITR for a postgresql instance operating on OpenBSD/64-bit. Is it possible to restore the backup on a completely different machine (i.e. other OS/32-bit)? What about restoring on

Re: [GENERAL] experience with tags schemas

2010-11-05 Thread Richard Broersma
On Fri, Nov 5, 2010 at 10:07 AM, Matthieu Huin matthieu.h...@wallix.com wrote: Does anyone here have any experience with tags schemas on postgresql ? I don't, but this problem look strangely familiar to a problem/solution found in Joe Celko book SQL puzzles. Check out puzzle 17 answer #2:

[GENERAL] Access postgresql data base from .net

2010-11-05 Thread mike stanton
Hello all; we´ve got a project where we have a system built originally for .net/sql-server. Now we want to change sql-server for a postgresql database. And preferably without using the ODBC driver which we have heard is prone to errors. Is there a producto which we can use which does not imply

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Dann Corbit
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton Sent: Friday, November 05, 2010 12:08 PM To: pgsql-general@postgresql.org Cc: mike stanton Subject: [GENERAL] Access postgresql data base from .net Hello all; we´ve got a project where

Re: [GENERAL] experience with tags schemas

2010-11-05 Thread Chris Browne
matthieu.h...@wallix.com (Matthieu Huin) writes: Greetings, Does anyone here have any experience with tags schemas on postgresql ? I am struggling with a schema inspired by scuttle described here : http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html Performances drop

Re: [GENERAL] Cloning database without dump/restore

2010-11-05 Thread Dimitri Fontaine
Andrus kobrule...@hot.ee writes: How to clone database fast ? How to create server side pl/pgsql script which use code like in pg_dump/pg_restore and or in pg_migrator and clones existing database or other idea ? See pg_basebackup here: https://github.com/dimitri/pg_basebackup I'm

Re: [GENERAL] Linux

2010-11-05 Thread Jason Long
I use Centos for production and Fedora for development and I am very happy with both. Especially Centos as I have never had an update break anything. On Fri, 2010-11-05 at 09:50 -0400, David Siebert wrote: I would say that if you pick any of the big four you will be fine. CentOS Ubuntu Server

Re: [GENERAL] Linux

2010-11-05 Thread Scott Marlowe
On Fri, Nov 5, 2010 at 2:58 PM, Jason Long mailing.li...@octgsoftware.com wrote: I use Centos for production and Fedora for development and I am very happy with both.  Especially Centos as I have never had an update break anything. I have to agree that Centos is tank-like in its reliability

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread mike stanton
Dann, perhaps the a better question would be.if we use, for example, npgsql, we'd have to adapt code and use the tools own calls. And that means rewriting. Is this true?. Cheers Mike - Original Message - From: Dann Corbit To: 'mike stanton' ; pgsql-general@postgresql.org

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Dann Corbit
In theory, if you are already using a .NET data provider, then you simply change the data source. In practice, you might have to make a few small changes. That is the entire beauty of using OLEDB, ODBC, .NET providers, etc. Since you are coding to an industry standard, every data access tool

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Francisco Figueiredo Jr.
We've made changes to support @ parameter prefix exactly to easy porting of sqlserver client queries to postgresql. This way you may need minimum changes to your code. Just to those specific sql calls. On Fri, Nov 5, 2010 at 19:40, mike stanton mike.stan...@autocastillo.cl wrote: Dann, perhaps

Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread John R Pierce
On 11/05/10 2:40 PM, mike stanton wrote: Dann, perhaps the a better question would be.if we use, for example, npgsql, we'd have to adapt code and use the tools own calls. And that means rewriting. Is this true?. npgsql implements oledb, I thought, which hooks right up to the .NET