Re: [GENERAL] plpython feature idea: an option to return row results as lists

2010-07-30 Thread Peter Eisentraut
On fre, 2010-07-30 at 16:45 -0500, Derek Arnold wrote: > Has there ever been any interest in adding a keyword option for > returning row lists rather than dicts? I don't think so, but it sounds like a reasonable idea. Other possible approaches are - Using a factory class like psycopg (http://in

Re: [GENERAL] plpython feature idea: an option to return row results as lists

2010-07-30 Thread Alex Hunsaker
On Fri, Jul 30, 2010 at 15:45, Derek Arnold wrote: > With result rows in plpython returned as dicts rather than lists, we ran > into issues with a need to preserve the column order in the resultset. Interesting, +1 for the idea. > plpy.execute(""" > SELECT 1 as a, 2 as b, NULL as c, ARRAY[1,2,

[GENERAL] plpython feature idea: an option to return row results as lists

2010-07-30 Thread Derek Arnold
With result rows in plpython returned as dicts rather than lists, we ran into issues with a need to preserve the column order in the resultset. Of course, dicts in python have an arbitrary, non-random order. It's consistent in the result but does not match the order in the query. Our use case w

Re: [GENERAL] PQescapeStringConn

2010-07-30 Thread Scott Frankel
On Jul 30, 2010, at 9:11 AM, Richard Huxton wrote: On 30/07/10 16:57, Scott Frankel wrote: On Jul 30, 2010, at 1:13 AM, Richard Huxton wrote: On 30/07/10 07:52, Scott Frankel wrote: I have a number of very long strings that each contain many instances of semi-colons, single quotes, forwar

Re: [GENERAL] Dynamic data model, locks and performance

2010-07-30 Thread Andreas Joseph Krogh
On 07/30/2010 10:20 PM, John R Pierce wrote: On 07/30/10 1:08 PM, Andreas Joseph Krogh wrote: You might want to take a look at TopicMaps, http://www.topicmaps.org/ One of the greatest topicmap-engines is opensource: http://www.ontopia.net/ Huh, visited both those sites, and I still have no i

Re: [GENERAL] Dynamic data model, locks and performance

2010-07-30 Thread John R Pierce
On 07/30/10 1:08 PM, Andreas Joseph Krogh wrote: You might want to take a look at TopicMaps, http://www.topicmaps.org/ One of the greatest topicmap-engines is opensource: http://www.ontopia.net/ Huh, visited both those sites, and I still have no idea what TopicMaps actually are. -- Sent vi

Re: [GENERAL] Dynamic data model, locks and performance

2010-07-30 Thread Andreas Joseph Krogh
On 07/29/2010 05:15 AM, Pierre Thibault wrote: 2010/7/28 Craig Ringer > On 29/07/10 07:06, Pierre Thibault wrote: I doubt anyone can make any useful recommendations without a more complete explanation of what you're trying to achieve and why you wa

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-30 Thread Greg Smith
Tom Lane wrote: I'm sure EnterpriseDB or one of the other PG support companies would be happy to sell you a support contract, if having somebody to sue is an essential part of happiness. And on a good day, access to someone with the source code who will actually be motivated to fix your pro

Re: [GENERAL] PQescapeStringConn

2010-07-30 Thread Richard Huxton
On 30/07/10 16:57, Scott Frankel wrote: On Jul 30, 2010, at 1:13 AM, Richard Huxton wrote: On 30/07/10 07:52, Scott Frankel wrote: I have a number of very long strings that each contain many instances of semi-colons, single quotes, forward and back slashes, etc. I'm looking for an efficient a

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-30 Thread Vick Khera
On Thu, Jul 29, 2010 at 8:04 PM, Scott Marlowe wrote: > $50k or so you can throw 100 hard drives at the problem. Or even one of these: http://www.ramsan.com/products/ramsan-620.asp :-) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] PQescapeStringConn

2010-07-30 Thread Scott Frankel
On Jul 30, 2010, at 1:13 AM, Richard Huxton wrote: On 30/07/10 07:52, Scott Frankel wrote: I have a number of very long strings that each contain many instances of semi-colons, single quotes, forward and back slashes, etc. I'm looking for an efficient and safe way to write them to my db us

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Merlin Moncure
On Fri, Jul 30, 2010 at 10:34 AM, Derrick Rice wrote: > Is it possible to use the ARRAY(select ...) syntax as a substitute for > array_agg on versions of postgresql that don't have it? (8.2)  It works > simply enough when only selecting a single column, but if I need to group by > some other colum

Re: [GENERAL] idle process & autovacuum

2010-07-30 Thread Brad Nicholson
On 10-07-30 10:52 AM, Gauthier, Dave wrote: Hi: I have a perl/dbi script that's loading a lot of data into a DB (probably about 8,000,000 records). pg_stat_activity shows the script's activity alongside another process with current_query as... autovacuum: ANALYZE public.instance_pins The

[GENERAL] idle process & autovacuum

2010-07-30 Thread Gauthier, Dave
Hi: I have a perl/dbi script that's loading a lot of data into a DB (probably about 8,000,000 records). pg_stat_activity shows the script's activity alongside another process with current_query as... autovacuum: ANALYZE public.instance_pins The total instance_pins table cardinality is about 6

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Derrick Rice
On Tue, Jul 27, 2010 at 9:33 AM, Gauthier, Dave wrote: > The select array (select col1 from foo ); ...did it. > > Thanks! > > -Original Message- > From: Merlin Moncure [mailto:mmonc...@gmail.com] > Sent: Tuesday, July 27, 2010 9:25 AM > To: Gauthier, Dave > Cc: pgsql-general@postgresq

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Derrick Rice
Is it possible to use the ARRAY(select ...) syntax as a substitute for array_agg on versions of postgresql that don't have it? (8.2) It works simply enough when only selecting a single column, but if I need to group by some other column, I'm not clear how I'd go about doing that. For example, wri

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-30 Thread Tom Lane
Howard Rogers writes: > Sadly, I won't be able to provide much further analysis or > information, because the box concerned is being wiped. The MD decided > that, as a matter of corporate governance, he couldn't punt the > company on PostgreSQL, so my experimenting days are over. Back to > Oracle:

Re: [GENERAL] PostgreSQL keepalives help

2010-07-30 Thread Richard Huxton
On 29/07/10 21:16, Kananda wrote: I need the records are free for edit, in few minutes. Therefore I set the KEEPALIVE configuration in my "postgresql.conf": tcp_keepalives_idle = 60 # TCP_KEEPIDLE, in seconds; tcp_keepalives_interval = 60 # TCP_KEEPINTVL, in seconds; tcp_keepalives_count TCP_K

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Greg Smith
Bill wrote: I have been told that the limit on Windows is about 300 concurrent users. It's actually a good bit worse than that unless you do some very specific Windows tuning--125. See the last entry at http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows for

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Brad Nicholson
On 10-07-29 08:54 PM, Greg Smith wrote: Brad Nicholson wrote: Postgres also had a reputation of being slow compared to MySQL. This was due to a lot of really poor MySQL vs Postgres benchmarks floating around in the early 2000's. I think more of those were fair than you're giving them credit f

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Brad Nicholson
On 10-07-29 08:54 PM, Greg Smith wrote: Brad Nicholson wrote: Postgres also had a reputation of being slow compared to MySQL. This was due to a lot of really poor MySQL vs Postgres benchmarks floating around in the early 2000's. I think more of those were fair than you're giving them credit f

Re: [GENERAL] How to improve: performance of query on postgresql 8.3 takes days

2010-07-30 Thread Alban Hertroys
On 29 Jul 2010, at 23:58, Dino Vliet wrote: > CREATE OR REPLACE FUNCTION agenttype1(a character) > RETURNS integer AS > LANGUAGE 'plpgsql' VOLATILE > COST 100; > > > CREATE OR REPLACE FUNCTION agenttype2(a character) > RETURNS integer AS > LANGUAGE 'plpgsql' VOLATILE > COST 100; > > > CREATE

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Alban Hertroys
On 29 Jul 2010, at 21:52, Sandeep Srinivasa wrote: > So what am I driving at ? If you have to time to spare or have the > inclination, please please put out blog posts, how-tos, guides which relate > to usecases like putting up a blog, setting up an online shop, configuring a > popular CRM pa

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Alban Hertroys
On 30 Jul 2010, at 2:25, Bill wrote: > My guess is that there are a lot of people who know of > MySQL who have never heard of PostgreSQL. This is unfortunately still true. Recently I've been going through a series of job applications at several companies and frequently the IT people I was talkin

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-30 Thread Dean Rasheed
On 30 July 2010 00:38, Howard Rogers wrote: > I can't see any change to the sorting behaviour there. Work_mem was > set to 4096MB, shared buffers to 12228MB, temp_buffers to 1024MB, > effective_cache_size to 18442MB. > Ah yes. The sorting idea was a complete red herring. The top-N heapsort to pic

Re: [GENERAL] PQescapeStringConn

2010-07-30 Thread Richard Huxton
On 30/07/10 07:52, Scott Frankel wrote: I have a number of very long strings that each contain many instances of semi-colons, single quotes, forward and back slashes, etc. I'm looking for an efficient and safe way to write them to my db using a prepared statement. What language? From "C"? PRE