Re: [GENERAL] Libpq binary mode SELECT ... WHERE ID IN ($1) Question

2009-11-12 Thread silly8888
You could try to prepare a query like this: select name from foo where id=any($1); and then pass the array of integers as $1 (although, I don't know how you can do that as I've never used the C interface of libpq). On Fri, Nov 13, 2009 at 1:34 AM, Matt Sanchez wrote: > Hello, > > Suppose

Re: [GENERAL] Postgres Clustering Options

2009-11-12 Thread Mikko Partio
On Fri, Nov 13, 2009 at 1:47 AM, David Kerr wrote: > In your enviornment, are the applications able to recover automatically > after > a DB failover? > > For exmaple, we're using Java/JDBC connections +Geronimo we're researching > whether > or not JDBC/Geronimo would be able to retry in the case

[GENERAL] Libpq binary mode SELECT ... WHERE ID IN ($1) Question

2009-11-12 Thread Matt Sanchez
Hello, Suppose I have a table: create table foo ( id int4, name varchar(50) ); I want to prepare and execute in binary mode: select name from foo where id in ($1); Execute works when I have a single value for $1, and treat it as a normal INT4. However, when I attempt to send mult

Re: [GENERAL] Postgres Clustering Options

2009-11-12 Thread Joshua J. Kugler
On Wednesday 11 November 2009, David Kerr said something like: > I'm trying to meet a very high uptime requirement in a high > performance environment. If you don't mind Xen, have you considered: http://dsg.cs.ubc.ca/remus/ System mirroring/hot standby, with instant failover, complete with any o

[GENERAL] pgmemcache vs pgmemcached

2009-11-12 Thread Juan Backson
Hi, Have anyone tried pgmemcache and pgmemcached? What is the difference betweent he two? They are both non-persistent, so I have difficult time deciding which one to use. Any suggestion? Thanks, jb

Re: [GENERAL] Postgres Clustering Options

2009-11-12 Thread David Kerr
On Thu, Nov 12, 2009 at 07:50:06AM +0200, Mikko Partio wrote: - On Wed, Nov 11, 2009 at 7:28 PM, David Kerr wrote: - > basically point to using a replication based solution, which i don't think - > would meet my - > performance demands. - > - > Does anyone have expereince with this or a similar se

Re: [GENERAL] Full Text Search 101?

2009-11-12 Thread Jonathan
Just wanted to thank everyone for the input so far. I do appreciate it! I'm going to read through some of this tonight and see what I can do! Thanks! Jonathan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/m

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Peter Hunsberger
On Thu, Nov 12, 2009 at 4:26 PM, Hans-Juergen Schoenig wrote: > >> I had no idea that European beer was uhmm, twice as strong as US >> counterparts. I knew I was in trouble when people (Dave Page) poured >> Scotch into my water. It was time to go before I got into a LOT of >> trouble :P >> >> Josh

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Hans-Juergen Schoenig
I had no idea that European beer was uhmm, twice as strong as US counterparts. I knew I was in trouble when people (Dave Page) poured Scotch into my water. It was time to go before I got into a LOT of trouble :P Joshua D. Drake btw, the "normal" beer is twice as strong as the US one (arou

Re: [GENERAL] Full Text Search 101?

2009-11-12 Thread Aurynn Shaw
Hi Jonathan; > > I posted to this forum once before and was able to receive help. > Thanks again! > > I'm trying to implement full text search capabilities. Basically, I > have a very simple "data catalog" type of website (http:// > gis.drcog.org/datacatalog), where the user can type in a word o

Re: [GENERAL] Full Text Search 101?

2009-11-12 Thread Michael Nacos
there's a lot of material on this site: http://www.sai.msu.su/~megera/wiki/tsearch2slides how do you create your tsvectors? If all your results have the same score (assuming you are using two or more tokens in your tsquery) it might be that your tsvector lacks positional information ('a b'::tsvect

[GENERAL] Full Text Search 101?

2009-11-12 Thread Jonathan
Hi everyone, I posted to this forum once before and was able to receive help. Thanks again! I'm trying to implement full text search capabilities. Basically, I have a very simple "data catalog" type of website (http:// gis.drcog.org/datacatalog), where the user can type in a word or words to sea

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Raymond O'Donnell
On 12/11/2009 19:01, Joshua D. Drake wrote: > I had no idea that European beer was uhmm, twice as strong as US > counterparts. I knew I was in trouble when people (Dave Page) poured > Scotch into my water. It was time to go before I got into a LOT of > trouble :P Hmmmit's usually supposed to

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Joshua D. Drake
On Thu, 2009-11-12 at 18:47 +, Dave Page wrote: > It's Joshua Drake, aka JD. > On Thu, 2009-11-12 at 08:41 +, Dave Page wrote: > > (whose idea was it to have Cognac after beer, red wine and > > scotch anyway?) > > **Perfect** idea -- but it was not me ;) > >>> > >>>

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Dave Page
It's Joshua Drake, aka JD. On 11/12/09, Pedro Doria Meunier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Ok a *bit* off-topic here... ;-) > But who's this? He reminds me after a programming maraton! :-D > Or after a cognac after red wine! :-P > > Whoever your are... Cheers Mate! ;

Re: [GENERAL] DB Restart

2009-11-12 Thread John R Pierce
Sam Jas wrote: ... BTW we are using postgreSQL 8.3.2. red flag. 8.3 is up to 8.3.8, lots of updates since 8.3.2 I attach the release notes for these incremental revisions. note there are gobs of fixes in many of these releases.you can upgrade 8.3.2 directly to 8.3.8, with only the c

Re: [GENERAL] upgrade to 8.4 with new character set

2009-11-12 Thread Howard Cole
Kevin Duffy wrote: We are trying to upgrade to 8.4 and the windows binaries would like us to use UTF8. Jonathan Schindler I would advise caution upgrading to 8.4 on windows as it seems to cause more of the random winsock 10061 error. Which in my experience happens hundreds of tim

Re: [GENERAL] upgrade to 8.4 with new character set

2009-11-12 Thread Howard Cole
Kevin Duffy wrote: We originally built our database with a character set of SQL_ASCII. We now know the error of our foolish ways. We are trying to upgrade to 8.4 and the windows binaries would like us to use UTF8. I would like to use a backup to restore onto the new installation, howeve

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Devrim GÜNDÜZ
On Thu, 2009-11-12 at 17:24 +, Dave Page wrote: > >> **Perfect** idea -- but it was not me ;) > > > > Maybe JD? > > Hahahahaha. He went back to his hotel early, unable to cope with a > European party :-p > > http://img132.yfrog.com/i/3e9o.jpg/ > *sigh* I really should have been there :-) -

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok a *bit* off-topic here... ;-) But who's this? He reminds me after a programming maraton! :-D Or after a cognac after red wine! :-P Whoever your are... Cheers Mate! ;) BR, Pedro On 11/12/2009 05:24 PM, Dave Page wrote: > 2009/11/12 Alvaro Herrera

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Dave Page
2009/11/12 Alvaro Herrera : > Devrim GÜNDÜZ escribió: >> On Thu, 2009-11-12 at 08:41 +, Dave Page wrote: >> > (whose idea was it to have Cognac after beer, red >> > wine and scotch anyway?) >> >> **Perfect** idea -- but it was not me ;) > > Maybe JD? Hahahahaha. He went back to his hotel early

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Alvaro Herrera
Devrim GÜNDÜZ escribió: > On Thu, 2009-11-12 at 08:41 +, Dave Page wrote: > > (whose idea was it to have Cognac after beer, red > > wine and scotch anyway?) > > **Perfect** idea -- but it was not me ;) Maybe JD? -- Alvaro Herrerahttp://www.CommandPrompt.com/

Re: [GENERAL] What is the simpliest text search configuration?

2009-11-12 Thread Oleg Bartunov
We submitted unaccent dictionary for 8.5 See http://www.sai.msu.su/~megera/wiki/unaccent for some information Oleg On Thu, 12 Nov 2009, Jrme Etv wrote: Hi Michael, I actually found that the 'simple' dictionary doesn't enforce a stopword list by default. so i defined my search conf like this an

Re: [GENERAL] re-using RETURNING

2009-11-12 Thread Andreas Kretschmer
A. Kretschmer wrote: > Hi, > > just to be sure, it is still (8.4) not possible to use RETURNING within an > other INSERT? Thx for all replies. It is not a really problem, i will write a benchmark to compare the new writeable CTE (in 8.5 alpha) with the old style (8.4). That's all ;-) And yes,

Re: [GENERAL] What is the simpliest text search configuration?

2009-11-12 Thread Tom Lane
=?UTF-8?B?SsOpcsO0bWUgRXTDqXbDqQ==?= writes: > I'd like to implement a full text search with postgresql, and I can't find > a text search configuration that would just: > map unicode accentuated letters to an un-accentuated equivalent > tokenize the words (and skip any non word characters) > no

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Tom Lane
Ivan Sergio Borgonovo writes: > BTW I think I've spotted an error in the docs: > http://www.postgresql.org/docs/8.3/interactive/ddl-schemas.html > http://www.postgresql.org/docs/8.4/interactive/ddl-schemas.html > 5.7.2. The Public Schema > In the previous sections we created tables without speci

Re: [GENERAL] DB Restart

2009-11-12 Thread Richard Huxton
Sam Jas wrote: > We are running on 64 - bit. > Whenever the reserved memory in top command it crosses 3.9g it hangs. > If we try to kill process (using pg_cancel_backend()) it won't kill. At last > either > we have to kill all process at OS level or we have to reboot the server. > After reboot

Re: [GENERAL] re-using RETURNING

2009-11-12 Thread Craig Ringer
On 12/11/2009 9:41 PM, A. Kretschmer wrote: > Hi, > > just to be sure, it is still (8.4) not possible to use RETURNING within an > other INSERT? Not directly, now. However, if I recall correctly in 8.4 you *CAN* use a ... RETURNING statement within an SQL function, and use the results of that in

Re: [GENERAL] "duplicate key violates unique constraint" error

2009-11-12 Thread Scott Marlowe
On Wed, Nov 11, 2009 at 10:12 PM, tamanna madaan wrote: > > >  Hi All > > > > I have a cluster setup with one master and one slave . Replication from > master to slave is not taking place. > > I am getting this error  “duplicate key violates unique constraint”  in my > slon.log on slave . This err

Re: [GENERAL] What is the simpliest text search configuration?

2009-11-12 Thread Jérôme Etévé
Hi Michael, I actually found that the 'simple' dictionary doesn't enforce a stopword list by default. so i defined my search conf like this and it works: create text search configuration sbsimple ( parser = 'default' ) ; alter text search configuration sbsimple ALTER MAPPING FOR word,hword,asci

Re: [GENERAL] re-using RETURNING

2009-11-12 Thread Emanuel Calvo Franco
2009/11/12 A. Kretschmer : > Hi, > > just to be sure, it is still (8.4) not possible to use RETURNING within an > other INSERT? > > To show what i mean: > > test=*# insert into foo2 (id1, id2) (insert into foo(n) values > ('a'),('b'),('c') returning currval('some_sequence'), id); > ERROR:  syntax

Re: [GENERAL] DB Restart

2009-11-12 Thread Scott Marlowe
On Thu, Nov 12, 2009 at 12:10 AM, Sam Jas wrote: > > Hi, > > We are facing issue with the RES memory. Below is the o/p of top command. It > shows that writer process reserved 3.8g. We have observed that if it > increased to 3.9g we need to restart the db. Otherwise it hangs.  Kindly > suggest u

Re: [GENERAL] DB Restart

2009-11-12 Thread Scott Marlowe
(Please refrain from html email on the list) On Thu, Nov 12, 2009 at 12:10 AM, Sam Jas wrote: > > Hi, > > We are facing issue with the RES memory. Below is the o/p of top command. It > shows that writer process reserved 3.8g. We have observed that if it > increased to 3.9g we need to restart th

Re: [GENERAL] re-using RETURNING

2009-11-12 Thread Grzegorz Jaśkiewicz
On Thu, Nov 12, 2009 at 1:41 PM, A. Kretschmer < andreas.kretsch...@schollglas.com> wrote: > Hi, > > just to be sure, it is still (8.4) not possible to use RETURNING within an > other INSERT? > > it is being discussed for 8.5, but as far as features go - stable versions don't change (at least chan

[GENERAL] re-using RETURNING

2009-11-12 Thread A. Kretschmer
Hi, just to be sure, it is still (8.4) not possible to use RETURNING within an other INSERT? To show what i mean: test=*# insert into foo2 (id1, id2) (insert into foo(n) values ('a'),('b'),('c') returning currval('some_sequence'), id); ERROR: syntax error at or near "insert" LINE 1: insert int

Re: [GENERAL] What is the simpliest text search configuration?

2009-11-12 Thread Michael Nacos
Dear Jerome, from personal experience full-text searching in PostgreSQL can be quite powerful but it's not simple, it requires thought, planning and coding. PostgreSQL mainly provides an efficient token matching mechanism supporting positional information and weights, but natural language processi

Re: [GENERAL] DB Restart

2009-11-12 Thread Sam Jas
We are running on 64 - bit. Whenever the reserved memory in top command it crosses 3.9g it hangs. If we try to kill process (using pg_cancel_backend()) it won't kill. At last either we have to kill all process at OS level or we have to reboot the server. After rebooting server everything worke

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Devrim GÜNDÜZ
On Thu, 2009-11-12 at 08:41 +, Dave Page wrote: > (whose idea was it to have Cognac after beer, red > wine and scotch anyway?) **Perfect** idea -- but it was not me ;) -- Devrim GÜNDÜZ , RHCE Professional Services, Training, 24x7 Support Authors: PostgreSQL Replicator, ODBCng, PostgreSQL RPM

[GENERAL] What is the simpliest text search configuration?

2009-11-12 Thread Jérôme Etévé
Hi all, I'd like to implement a full text search with postgresql, and I can't find a text search configuration that would just: map unicode accentuated letters to an un-accentuated equivalent tokenize the words (and skip any non word characters) no stopwords lower case the tokens How can I achi

Re: [GENERAL] DB Restart

2009-11-12 Thread Richard Huxton
Sam Jas wrote: > Thanks for your reply. > > No we are not running OOM. ulimit o/p is as below. > > [postg...@server1 ~]$ ulimit > unlimited Unless you are running on a 32-bit system you should be alright then. What precisely is the problem? What do you mean by the DB "hangs"? -- Richard H

Re: [GENERAL] DB Restart

2009-11-12 Thread Sam Jas
Thanks for your reply. No we are not running OOM. ulimit o/p is as below. [postg...@server1 ~]$ ulimit unlimited --- On Thu, 12/11/09, Richard Huxton wrote: From: Richard Huxton Subject: Re: [GENERAL] DB Restart To: "Sam Jas" Cc: "general" Date: Thursday, 12 November, 2009, 10:39 AM Sa

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
On Thu, 12 Nov 2009 10:38:27 + Richard Huxton wrote: > Ivan Sergio Borgonovo wrote: > > I have a search_path that may not just consist of $user, public. > > eg. > > $user, public, test, import > > > > I'd like to know which table is going to be chosen if I do a > > select * from mytable; >

Re: [GENERAL] DB Restart

2009-11-12 Thread Richard Huxton
Sam Jas wrote: > > > > Hi, > > We are facing issue with the RES memory. Below is the o/p of > top command. It shows that writer process reserved 3.8g. We have observed that > if it increased to 3.9g we need to restart the db. Otherwise it hangs. > Kindly suggest us the good way to figure it o

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Richard Huxton
Ivan Sergio Borgonovo wrote: > I have a search_path that may not just consist of $user, public. > eg. > $user, public, test, import > > I'd like to know which table is going to be chosen if I do a > select * from mytable; > Is there a way to ask postgresql the schema of the table that will be > c

Re: [GENERAL] "duplicate key violates unique constraint" error

2009-11-12 Thread Richard Huxton
tamanna madaan wrote: > > I am getting this error "duplicate key violates unique constraint" in > my slon.log on slave . This error is thrown while > > Slon is inserting a row in a table on slave. This must be because of > the reason that duplicate rows > > are being returned while querying

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Andreas 'ads' Scherbaum
On Thu, Nov 12, 2009 at 11:57:59AM +0200, Devrim GÜNDÜZ wrote: > On Thu, 2009-11-12 at 08:41 +, Dave Page wrote: > > (whose idea was it to have Cognac after beer, red > > wine and scotch anyway?) > > **Perfect** idea -- but it was not me ;) YOU wasn't there! ;-) --

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Thom Brown
2009/11/12 Dave Page : > On Thu, Nov 12, 2009 at 12:18 AM, Thom Brown wrote: > >> I second that.  I wasn't sure quite what to expect, but it was very >> well organised and executed.  And thanks to our French hosts whose >> hard work really paid off too!  The talks were excellent, especially >> Gav

Re: [GENERAL] PostgreSQL 8.3.8 on AIX5.3 : compilation failed

2009-11-12 Thread Alexandra Roy
Hi Tom, Laurenz and all, Adding #include "postgres.h" in src/bin/psql/psqlscan.c fixes the problem ! I tested the fix with PostgreSQL 8.3.8 and I would check the 8.3.9 as soon as possible. Thank you so much for your help and your rapidity to solve this question / problem !!! Have a nice day

[GENERAL] "duplicate key violates unique constraint" error

2009-11-12 Thread tamanna madaan
Hi All I have a cluster setup with one master and one slave . Replication from master to slave is not taking place. I am getting this error "duplicate key violates unique constraint" in my slon.log on slave . This error is thrown while Slon is inserting a row in a table on slave. This

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Dave Page
On Thu, Nov 12, 2009 at 8:44 AM, Magnus Hagander wrote: > On Thu, Nov 12, 2009 at 09:41, Dave Page wrote: >> On Thu, Nov 12, 2009 at 12:18 AM, Thom Brown wrote: >> >>> I second that.  I wasn't sure quite what to expect, but it was very >>> well organised and executed.  And thanks to our French h

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Magnus Hagander
On Thu, Nov 12, 2009 at 09:41, Dave Page wrote: > On Thu, Nov 12, 2009 at 12:18 AM, Thom Brown wrote: > >> I second that.  I wasn't sure quite what to expect, but it was very >> well organised and executed.  And thanks to our French hosts whose >> hard work really paid off too!  The talks were ex

Re: [GENERAL] [pgeu-general] pgday.eu

2009-11-12 Thread Dave Page
On Thu, Nov 12, 2009 at 12:18 AM, Thom Brown wrote: > I second that.  I wasn't sure quite what to expect, but it was very > well organised and executed.  And thanks to our French hosts whose > hard work really paid off too!  The talks were excellent, especially > Gavin M. Roy's lightning talk ;)

[GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
I may have several tables with the same name in different schema. pina.mytable, test.mytable, import.mytable I have a search_path that may not just consist of $user, public. eg. $user, public, test, import I'd like to know which table is going to be chosen if I do a select * from mytable; In th