Re: [GENERAL] Can anyone help setting up pgbouncer?

2009-11-19 Thread Richard Huxton
Nick wrote: Solved. I restarted with the -v option and noticed a permission error with the .pid file. I guess I installed pgbouncer as root and that created the permission conflict. Ive updated the permissions and everythings running smoothly now. Thank you so much Richard for you help

[GENERAL] text search query planning

2009-11-19 Thread Henk van Lingen
Hi, I've a problem understanding of slow query. I use 8.4 for storing syslog messages, on which i want to do text searching. This table: syslog=# \d fw_msgs Table public.fw_msgs Column | Type | Modifiers --+--+--- datetime | text | facility | text | level|

[GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to get the array position for a given match as thus: This gets me the record for a given match: SELECT * FROM garmin_units WHERE 'L' = ANY (protocol_tag); Ok. so far so good... But what about getting the array position at which 'L'

Re: [GENERAL] Enum on-disk format

2009-11-19 Thread Peter Eisentraut
On ons, 2009-11-18 at 22:33 -0800, Scott Bailey wrote: The only I/O functions I'm aware of are send, recv, in and out. What controls converting from/to wire and on-disk formats? send and recv And why is wire format little endian and disk big endian? The wire format is network order

[GENERAL] Re: vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-19 Thread Tech 2010
On 18 nov., 16:48, Tech 2010 tch...@gmail.com wrote: On 18 nov., 13:40, thombr...@gmail.com (Thom Brown) wrote: 2009/11/18 Tech 2010 tch...@gmail.com: Hello! How do I location of this pointer and how do I zero it so I can access the rest of the data? zero_damaged_pages = true did

[GENERAL] Dblink to Oracle

2009-11-19 Thread Nicola Farina
Hello, I am trying to ask everywhere I can, sorry if this is not the right place. I need to create a dblink from postgresql 8.4 towards Oracle, is it possible ? may you provide an example ? thanks Bye Nicola -- Nicola Farina Ufficio Progetti Info Line Srl, Via Colorno 63/a, 43122 Parma Tel

Re: [GENERAL] Re: vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-19 Thread Thom Brown
2009/11/19 Tech 2010 tch...@gmail.com: On 18 nov., 16:48, Tech 2010 tch...@gmail.com wrote: On 18 nov., 13:40, thombr...@gmail.com (Thom Brown) wrote: 2009/11/18 Tech 2010 tch...@gmail.com: Hello! How do I location of this pointer and how do I zero it so I can access the rest of the

Re: [GENERAL] Dblink to Oracle

2009-11-19 Thread Bruno Lavoie
you might look at dbilink, on the other side if you need you can also look at Oracle Heterogeneous Services... Nicola Farina a écrit : Hello, I am trying to ask everywhere I can, sorry if this is not the right place. I need to create a dblink from postgresql 8.4 towards Oracle, is it

Re: [GENERAL] Re: vacuumdb: vacuuming of database xy failed: PANIC: corrupted item pointer: 19227

2009-11-19 Thread Tom Lane
Tech 2010 tch...@gmail.com writes: xy=# reindex table xy_data; ERROR:  concurrent insert in progress Should I drop and recreate indexes? I think that database is pretty well hosed. (What happened to it to cause all this, anyway?) A dump/initdb/reload is probably indicated at this point.

[GENERAL] index storage planning

2009-11-19 Thread Ray Stell
Is there a doc that covers planning disk storage of indices? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Books

2009-11-19 Thread Thomas Løcke
Hey all, There's a new series of PostgreSQL books available: PostgreSQL 8.4 Official Documentation - Volume Ihttp://www.amazon.co.uk/PostgreSQL-8-4-Official-Documentation-Language/dp/1596821582/ref=sr_1_6?ie=UTF8s=booksqid=1258645559sr=8-6 PostgreSQL 8.4 Official Documentation - Volume

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Scott Bailey
Pedro Doria Meunier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to get the array position for a given match as thus: This gets me the record for a given match: SELECT * FROM garmin_units WHERE 'L' = ANY (protocol_tag); Ok. so far so good... But what about getting the

[GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Raimon Fernandez
Hello, I'm trying to send some strings that have chars outside from standar ascii, like çñàèó Once I'm connected, the client and server both uses UT8Encoding. And I'm sending all the strings encoded in UTF8. At least the received ones are working, as I get the text exactly as it is, with

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Pavel Stehule
2009/11/19 Scott Bailey arta...@comcast.net: Pedro Doria Meunier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to get the array position for a given match as thus: This gets me the record for a given match: SELECT *  FROM garmin_units WHERE 'L' = ANY

Re: [GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Kovalevski Andrei
Hi could it be that you have errors in your UTF8 string? For example you might use UTF16 encoding, it can explain why some characters force errors but others are not. Can you post here the string and its' encoded version? Raimon Fernandez wrote: Hello, I'm trying to send some strings

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Sam Mason
On Thu, Nov 19, 2009 at 05:24:33PM +0100, Pavel Stehule wrote: it should be little bit more effective: I'm not sure if it will be much more; when you put a set returning function into a FROM clause PG will always run the function to completion---as far as I know, but I've only got 8.3 for

Re: [GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Raimon Fernandez
On 19/11/2009, at 17:27, Kovalevski Andrei wrote: Hi could it be that you have errors in your UTF8 string? For example you might use UTF16 encoding, it can explain why some characters force errors but others are not. It only happens with values like àéïçñ I think UTF8 can handle this

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Scott Bailey
FROM generate_series(array_lover($1,1),array_upper($1,1)) g(i) Pavel, Don't get me wrong, I enjoy coding, but I think you've taken it too far here ;) Yes, definitely more effective for large arrays. Thanks. Would probably be a good snippet for the wiki. Scott -- Sent via

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Merlin Moncure
On Thu, Nov 19, 2009 at 12:15 PM, Scott Bailey arta...@comcast.net wrote:   FROM generate_series(array_lover($1,1),array_upper($1,1)) g(i) Pavel, Don't get me wrong, I enjoy coding, but I think you've taken it too far here ;) Yes, definitely more effective for large arrays. Thanks. Would

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Scott Bailey
Sam Mason wrote: On Thu, Nov 19, 2009 at 05:24:33PM +0100, Pavel Stehule wrote: it should be little bit more effective: I'm not sure if it will be much more; when you put a set returning function into a FROM clause PG will always run the function to completion---as far as I know, but I've

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Sam Mason
On Thu, Nov 19, 2009 at 09:46:42AM -0800, Scott Bailey wrote: We had an idx() function in the _int contrib module. I wonder if it would be useful to write this in C now that _int is deprecated? Is idx really the best name for this? there could be multiple occurrences of a value in an array

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Scott Bailey
this was actually a pretty typical solution to dealing with arrays until we got 'unnest()'. See information_schema._pg_expand_array for example. Oh I know. I was just having a laugh at the array_lover function. Now that I think about it, we could replace array_agg() with array_orgy() and

Re: [GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Raimon Fernandez
On 19/11/2009, at 18:13, Raimon Fernandez wrote: On 19/11/2009, at 17:27, Kovalevski Andrei wrote: Hi could it be that you have errors in your UTF8 string? For example you might use UTF16 encoding, it can explain why some characters force errors but others are not. It only

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Sam Mason
On Thu, Nov 19, 2009 at 12:43:38PM -0500, Merlin Moncure wrote: we could use a version of unnest that works like that (returns idx, elem)? It would be a small efficiency win over generate_series based approaches. What would idx look like for multidimensional arrays? I think PG needs a

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Pavel Stehule
2009/11/19 Sam Mason s...@samason.me.uk: On Thu, Nov 19, 2009 at 05:24:33PM +0100, Pavel Stehule wrote: it should be little bit more effective: I'm not sure if it will be much more; when you put a set returning function into a FROM clause PG will always run the function to completion---as

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Scott Bailey
Sam Mason wrote: On Thu, Nov 19, 2009 at 09:46:42AM -0800, Scott Bailey wrote: We had an idx() function in the _int contrib module. I wonder if it would be useful to write this in C now that _int is deprecated? Is idx really the best name for this? there could be multiple occurrences of a

[GENERAL] Possible bug with array_agg

2009-11-19 Thread Scott Bailey
On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) Probably not a big deal because its not something you would typically do. I was testing something else and ran into it. But if there is a limit there, we should

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Sam Mason
On Thu, Nov 19, 2009 at 10:47:02AM -0800, Scott Bailey wrote: Sam Mason wrote: Is idx really the best name for this? Well I used idx() because there was already a idx(int[], int) function with the _int contrib module. I don't remember ever using that before, hence my question. In other

Re: [GENERAL] obtaining ARRAY position for a given match

2009-11-19 Thread Pavel Stehule
CREATE OR REPLACE FUNCTION idx(anyarray, anyelement) RETURNS int AS $$ SELECT i   FROM (SELECT generate_subscripts($1) as i, unnest($1) as v) s  WHERE v = $2  LIMIT 1; $$ LANGUAGE sql; there is bug correct is create or replace function idx(anyarray, anyelement) returns int as $$ select

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Pavel Stehule
Hello 2009/11/19 Scott Bailey arta...@comcast.net: On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) can you send a query? postgres=# create table f(a int); CREATE TABLE postgres=# insert into f select * from

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Tom Lane
Scott Bailey arta...@comcast.net writes: On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) What do you mean by does not return a value? In general, giving a specific test case is a lot more helpful than this sort of

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Scott Bailey
Pavel Stehule wrote: Hello 2009/11/19 Scott Bailey arta...@comcast.net: On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) can you send a query? postgres=# create table f(a int); CREATE TABLE postgres=# insert into

Re: [GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Kovalevski Andrei
Hi, the string is ok, but the problem is inside the message. The length of the message is incorrect: your message: 5100*46*557064617465207472616E73616374696F6E7320736574206465736372697074696F6E3D27546573742056616C75657364C387272077686572652069643D313133 it should be:

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Guillaume Lelarge
Le jeudi 19 novembre 2009 à 20:45:36, Scott Bailey a écrit : Pavel Stehule wrote: Hello 2009/11/19 Scott Bailey arta...@comcast.net: On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) can you send a query?

Re: [GENERAL] Issues with Redhat 4 Postgresql 8.4 and support of libxml

2009-11-19 Thread Joshua D. Drake
On Thu, 2009-11-19 at 12:05 -0800, ar...@esri.com wrote: What are the issues with Redhat 4 in terms of supporting libxml? I build PostgreSQL 8.4 with --with-libxml option but still getting the following error. You probably need to tell postgresql to compile against the specific new version

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Scott Bailey
I'm not sure which release you use, but it works for me (1.10 and 1.11). The result of the first query is badly displayed (remember that it tries to display an array of 10 integers), but the query returns something that pgAdmin tries to display. The others work too but the display is

Re: [GENERAL] Books

2009-11-19 Thread Chris Browne
thomas.granv...@gmail.com (Thomas Løcke) writes: There's a new series of PostgreSQL books available: PostgreSQL 8.4 Official Documentation - Volume I PostgreSQL 8.4 Official Documentation - Volume II And so on, up to volume V I think. Would I be supporting the PostgreSQL project by buying

Re: [GENERAL] Encoding using the Frontend/Backend Protocol TCP/IP

2009-11-19 Thread Raimon Fernandez
On 19/11/2009, at 21:21, Kovalevski Andrei wrote: Hi, the string is ok, but the problem is inside the message. The length of the message is incorrect: your message:

Re: [GENERAL] Books

2009-11-19 Thread Greg Smith
Thomas Løcke wrote: Would I be supporting the PostgreSQL project by buying these, or are they just a compilation of the online manuals, done by some random author calling him-/herself The PostgreSQL Global Development Group? :o) They're a printout of the manuals that come with the database.

Re: [GENERAL] Issues with Redhat 4 Postgresql 8.4 and support of libxml

2009-11-19 Thread Devrim GÜNDÜZ
On Thu, 2009-11-19 at 12:05 -0800, ar...@esri.com wrote: What are the issues with Redhat 4 in terms of supporting libxml? I build PostgreSQL 8.4 with --with-libxml option but still getting the following error. If you are using libxml2-devel package from Red Hat repository, it won't work. The

Re: [GENERAL] Issues with Redhat 4 Postgresql 8.4 and support of libxml

2009-11-19 Thread Devrim GÜNDÜZ
On Thu, 2009-11-19 at 15:22 -0800, ar...@esri.com wrote: And where I can specify this version? I already tried --with-includes and --with-libraries option. Please show us complete configure line. -- Devrim GÜNDÜZ, RHCE Command Prompt - http://www.CommandPrompt.com devrim~gunduz.org,

Re: [GENERAL] DB terminating [on Windows]

2009-11-19 Thread Magnus Hagander
Looks like your typical backend crash of PID 9644, causing a typical restart. So something broke the backend - I'd start by trying to figure that out. Clearly, it's failing to restart after the crash, due to shared memory issues. At the risk of repeating, this often happens with antivirus on the

[GENERAL] HA-JDBC

2009-11-19 Thread David Kerr
http://ha-jdbc.sourceforge.net/ Is anyone using this? I'm considering it to handle failover for my Active/Passive cluster. (using Postgres + SLES + heartbeat) Thanks Dave -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] pgbouncer connections used

2009-11-19 Thread Scott Ribe
I have pgbouncer running fine, but was wondering: I don't see any way to get a report of the max # of connections actually used at once? I'm pretty sure that I currently never come close to maxing out my pool, but for planning purposes I'd like know what the actual peak is. Did I miss something

Re: [GENERAL] Possible bug with array_agg

2009-11-19 Thread Pavel Stehule
2009/11/19 Scott Bailey arta...@comcast.net: Pavel Stehule wrote: Hello 2009/11/19 Scott Bailey arta...@comcast.net: On 8.4.0 I found that array_agg does not return a value when fed more than 12,000 values. (12,000 worked and 13,000 did not.) can you send a query? postgres=# create

Re: [GENERAL] Dblink to Oracle

2009-11-19 Thread Sam Jas
Following link will give you details about “Heterogeneous Services Generic Connectivity”. http://oracledbnews.blogspot.com/2008/04/oracle-connections-to-non-oracle.html -- Thanks Sam Jas --- On Thu, 19/11/09, Nicola Farina nicola.far...@info-line.it wrote: From: Nicola Farina

Re: [GENERAL] Issues with Redhat 4 Postgresql 8.4 and support of libxml

2009-11-19 Thread Tom Lane
ar...@esri.com writes: What are the issues with Redhat 4 in terms of supporting libxml? I build PostgreSQL 8.4 with --with-libxml option but still getting the following error. STATEMENT: INSERT INTO test VALUES (1, 'fooabc/foo'); ERROR: unsupported XML feature LINE 1: INSERT INTO test