Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread A. Kretschmer
am Mon, dem 08.10.2007, um 15:46:04 -0500 mailte Scott Marlowe folgendes: > Actually CC to the sender is the norm on this list. I believe there Okay, no problem. I'm knowing other lists like the german debian user list and there is this CC to the sender unwanted. Andreas -- Andreas Kretschmer

Re: [GENERAL] Multiple versions on same box

2007-10-08 Thread Reece Hart
On Mon, 2007-10-08 at 17:34 -0700, Ralph Smith wrote: > What is the best way to upgrade? Use pg_dumpall (using 8.2's > program), afterwards redirect that file into v8.2 via psql v8.2? There are lots of ways to do this. My favorite is to bring a new cluster on port 5433 and then pipe data betwe

Re: [GENERAL] speeding up CUBE queries

2007-10-08 Thread Rajarshi Guha
On Oct 8, 2007, at 9:15 PM, Oleg Bartunov wrote: I'm not sure, but probably mtree will be better ? Thanks - do you have any pointers to this? Google only turns up an mtree utility that seems to be related to file system operations --

Re: [GENERAL] speeding up CUBE queries

2007-10-08 Thread Oleg Bartunov
I'm not sure, but probably mtree will be better ? On Mon, 8 Oct 2007, Rajarshi Guha wrote: Hi, I'm running Postgres 8.2.4 and have installed the CUBE extension. Using this I had a 10M row table populated with 12-dimensional zero-volume cubes (i.e., 12D points). My queries are of the form se

[GENERAL] Multiple versions on same box

2007-10-08 Thread Ralph Smith
Hello, For upgrade purposes I now have 7.4 and 8.2 on the same Ubuntu box, and that brings up some questions that I know of, and I'm sure many that I haven't thought of yet. I assume that I'll have to put the full path to the version of psql, etc, corresponding to the same version databas

[GENERAL] PG_TRY(), PG_CATCH()....

2007-10-08 Thread Alex Vinogradovs
Guys, I've got a C-implemented function which performs number of SPI_exec()'s in a loop, where each of them may fail, thus I wrapped them into the PG_TRY()/PG_CATCH() inside the loop. Something like this : for(i = 0; i < query_count; i++) { PG_TRY(); { SPI_exec(query[i], 1); } PG

[GENERAL] speeding up CUBE queries

2007-10-08 Thread Rajarshi Guha
Hi, I'm running Postgres 8.2.4 and have installed the CUBE extension. Using this I had a 10M row table populated with 12-dimensional zero- volume cubes (i.e., 12D points). My queries are of the form select * from ctab where '(x1,x2,x3,...,x12), (y1,y2,y3,...,y12)'::cube @> cubeField; So e

Re: [GENERAL] Lifting WHERE conditions out of inner select

2007-10-08 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > ... WHERE sense.synsetid > IN (SELECT synset2id FROM semlinkref > WHERE synset1id > IN (SELECT synsetid FROM sense > WHERE wordid = (SELECT wordid FROM word WHERE > lemma='scramble')) > AND linkid

Re: [GENERAL] Request: Anyone using bogus / "humorous"X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > A. Kretschmer wrote: > >> As far i can see your mails are correct. But one exclusion: please no >> CC: to the sender, i'm reading the list. > > The additional CC: to sender is customary on these lists. Generally it's just how Internet mailing lists w

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Scott Marlowe
On 10/8/07, A. Kretschmer <[EMAIL PROTECTED]> wrote: > am Mon, dem 08.10.2007, um 12:00:30 -0700 mailte Richard Broersma Jr > folgendes: > > --- "A. Kretschmer" <[EMAIL PROTECTED]> wrote: > > > > > at least post them and see what kind of response you get, > > > > > rather than judge the list as a

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Alvaro Herrera
A. Kretschmer wrote: > As far i can see your mails are correct. But one exclusion: please no > CC: to the sender, i'm reading the list. The additional CC: to sender is customary on these lists. -- Alvaro Herrera http://www.flickr.com/photos/alvherre/ "How amazing is that

Re: [GENERAL] Partitioned tables, rules, triggers

2007-10-08 Thread Josh Tolley
On 10/6/07, Goboxe <[EMAIL PROTECTED]> wrote: > Josh, > > Thanks for sharing a very good info on partitioning. > Don't thank me -- this comes from Robert Treat. I'm just the messenger :) -Josh/eggyknap ---(end of broadcast)--- TIP 2: Don't 'kill -9

Re: [GENERAL] Lifting WHERE conditions out of inner select

2007-10-08 Thread Richard Broersma Jr
OOPs! --- Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > --- "John D. Burger" <[EMAIL PROTECTED]> wrote: > > My question is, should the planner have figured this out, and we're > > just losing out because we're stuck in 7.4? Or is there some subtle > > difference in semantics I'm missing?

Re: [GENERAL] Lifting WHERE conditions out of inner select

2007-10-08 Thread Richard Broersma Jr
--- "John D. Burger" <[EMAIL PROTECTED]> wrote: > My question is, should the planner have figured this out, and we're > just losing out because we're stuck in 7.4? Or is there some subtle > difference in semantics I'm missing? The select results were the > same in both cases, but I'm willin

[GENERAL] Lifting WHERE conditions out of inner select

2007-10-08 Thread John D. Burger
Hi - A colleague presented the following very slow query to me: SELECT DISTINCT lemma FROM word JOIN sense USING (wordid) JOIN synset USING (synsetid) WHERE sense.synsetid IN (SELECT synset2id FROM semlinkref WHERE synset1id IN (SELECT synsetid FROM sens

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread A. Kretschmer
am Mon, dem 08.10.2007, um 12:00:30 -0700 mailte Richard Broersma Jr folgendes: > --- "A. Kretschmer" <[EMAIL PROTECTED]> wrote: > > > > at least post them and see what kind of response you get, > > > > rather than judge the list as a whole due to the response you got to > > > an > > > > off-top

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Richard Broersma Jr
--- "A. Kretschmer" <[EMAIL PROTECTED]> wrote: > > > at least post them and see what kind of response you get, > > > rather than judge the list as a whole due to the response you got to > > an > > > off-topic post. Many of the people on the lists have been here for > > years and > > > have gott

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A. Kretschmer wrote: > am Mon, dem 08.10.2007, um 13:05:50 -0400 mailte Bill Bartlett folgendes: (Makes me have to think twice about raising any _real_ issues though, like why my VACUUMs periodically keep >> getting into lock contention

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread A. Kretschmer
am Mon, dem 08.10.2007, um 13:05:50 -0400 mailte Bill Bartlett folgendes: > > > (Makes me have to think twice about raising > > > any _real_ issues though, like why my VACUUMs periodically keep > getting > > > into lock contentions with my JDBC connections and ultimately > causing me > > > to have

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Gregory Stark
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On 10/8/07, Bill Bartlett <[EMAIL PROTECTED]> wrote: >> >> (But I'm still not going to post the problem I've been >> hitting recently running Postgres 7.4.1 on a SuSE 9.0 box -- somehow I >> think the first few responses might be "get OFF that version

Re: [GENERAL] How to make LIKE to use index in "abc%" query?

2007-10-08 Thread Oleg Bartunov
On Mon, 8 Oct 2007, Dmitry Koterov wrote: Hello. I run explain analyze SELECT id FROM "table" WHERE name LIKE 'dt%'; having a btree index on "name" column. But unfortunately it uses seqscan instead of index scan, it's too slow. I had read some mailing archives about that problem, but have no

Re: [GENERAL] Foreign Key for PHP serialized data - possible?

2007-10-08 Thread Erik Jones
On Oct 8, 2007, at 12:08 PM, Michael Glaesemann wrote: On Oct 8, 2007, at 8:33 , Dave wrote: I guess, I can always set up views with joins, but could not come up with a good way to query this in a one returned row, e.g.: ID | Name | colors | fav_col | kind | fav_kind |

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Scott Marlowe
On 10/8/07, Bill Bartlett <[EMAIL PROTECTED]> wrote: > > Most people didn't completely read my email and thus unfortunately > completely missed the point, in many cases seemingly because they were > too quick to jump on my use of Outlook as an email client (thus assuming > I was just one of "those"

Re: [GENERAL] Foreign Key for PHP serialized data - possible?

2007-10-08 Thread Richard Huxton
Dave wrote: "Hannes Dorbath" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Dave wrote: e.g. if an id of Oranges changes from '5' to '24', the tb1_column rows will get changed in the above example row to: a:5:{i:0;s:1:"9";i:1;s:2:"24";i:2;s:2:"11";i:3;s:2:"100";i:4;s:2:"10";} No

Re: [GENERAL] Foreign Key for PHP serialized data - possible?

2007-10-08 Thread Michael Glaesemann
On Oct 8, 2007, at 8:33 , Dave wrote: I guess, I can always set up views with joins, but could not come up with a good way to query this in a one returned row, e.g.: ID | Name | colors | fav_col | kind | fav_kind | etc. 11 | Apples | red, green, etc. | red | Grann

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Bill Bartlett
> -Original Message- > From: Michael Glaesemann [mailto:[EMAIL PROTECTED] > Sent: Friday, October 05, 2007 3:25 PM > To: Bill Bartlett > Cc: 'Andreas Kretschmer'; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Request: Anyone using bogus / > "humorous" X-Message-Flag headers, coul

Re: [GENERAL] How to make LIKE to use index in "abc%" query?

2007-10-08 Thread Dimitri Fontaine
Le lundi 08 octobre 2007, Dmitry Koterov a écrit : > explain analyze > SELECT id FROM "table" WHERE name LIKE 'dt%'; > > having a btree index on "name" column. But unfortunately it uses seqscan > instead of index scan, it's too slow. It seems to me you'd benefit from reading this page of the fine

[GENERAL] How to make LIKE to use index in "abc%" query?

2007-10-08 Thread Dmitry Koterov
Hello. I run explain analyze SELECT id FROM "table" WHERE name LIKE 'dt%'; having a btree index on "name" column. But unfortunately it uses seqscan instead of index scan, it's too slow. I had read some mailing archives about that problem, but have not found a solution. How to fix this LIKE beha

Re: [GENERAL] Foreign Key for PHP serialized data - possible?

2007-10-08 Thread Dave
"Hannes Dorbath" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dave wrote: >> What I'm trying to do is to create a foreign key on tb1_column so that if >> a >> number in tb2_column changes or gets deleted, it cascades to the >> appropriate >> segment of the serialized data. >> e

Re: Re : [GENERAL] Very asynchrnous replication system

2007-10-08 Thread Ben
Oh, sorry, I misread your question and didn't realize the distributed copies would need to make modifications back. AFAIK, the MusicBrainz system is master/slave, not multi-master. On Mon, 8 Oct 2007, Laurent ROCHE wrote: Ben, As far as I can see MusicBrainz only does one way replication (w

Re: [GENERAL] Database reverse engineering

2007-10-08 Thread MargaretGillon
I am trying to use postgresql-autodoc. The autodoc finds all the Perl modules and compiles but when I go to /usr/local/bin and run postgresql_autodoc like this postgresql_autodoc -f owl -d owl -u postgres --password='' I get a message that says Use of uninitialized value in numeric lt (<)

Re: [GENERAL] SPI dumping core on large palloc

2007-10-08 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > Am I doing anything wrong here? Returning an already-pfree'd hunk of memory. I gather you are not testing your code in an enable-cassert build (tut tut), else you'd not think this worked for small allocations either. See http://developer.postgresql.

[GENERAL] SPI dumping core on large palloc

2007-10-08 Thread Merlin Moncure
I'm having an issue inside a SPI routine that is giving me crashes. I'm curious if this is a backend problem or something that I am doing improperly. The following SPI routine dumps core for large, but reasonable allocations: /* testing function. just makes bytea a of input len */ Datum _genbytes

Re: [GENERAL] starting a stored procedure+rule AFTER an insert

2007-10-08 Thread Douglas McNaught
"Bima Djaloeis" <[EMAIL PROTECTED]> writes: > I have implemented a stored procedure that writes out the newest DB > entry on insert, and combined it with a rule. > > 1) create function newcache() returns void AS 'newCache', 'newCache' language > c; > 2) create rule newcacherule AS on insert to cac

Re: [GENERAL] Problem with SELECT

2007-10-08 Thread A. Kretschmer
am Mon, dem 08.10.2007, um 3:28:04 -0700 mailte marwis1978 folgendes: > I have a following table > -+ > day | quantity > -+ > > where day is a date and quantity is an integer value. Now I need to > make a SELECT statement on this table which returns me a full > informati

Re: [GENERAL] Partitioned tables, rules, triggers

2007-10-08 Thread Goboxe
Josh, Thanks for sharing a very good info on partitioning. On Oct 5, 10:08 pm, [EMAIL PROTECTED] ("Josh Tolley") wrote: > On 10/3/07, Goboxe <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have two questions on the above: > > > 1. I found in some postings recommended to use triggers instead of > >

[GENERAL] Foreign Key for PHP serialized data - possible?

2007-10-08 Thread Dave
Hi, I have a table1 with a tb1_column that stores PHP serialized data that are unique integers. | tb1_column | --- a:5:{i:0;s:1:"9";i:1;s:2:"5";i:2;s:2:"11";i:3;s:2:"100";i:4;s:2:"10";} I also have a table2 with unique integers (ids) in tb2_column | tb2_column | descr | -- 11 | Pe

[GENERAL] Install dblink on postgres server on windows

2007-10-08 Thread Gelembjuk
Hello. I want to use fuction dblink in my queries. But it is not installed on my postgres server. I have found that i was able to install this function when installing postgres on my machine. I tried to start installation app again but it does not ask me if i want to install dblink (or other pac

[GENERAL] Problem with SELECT

2007-10-08 Thread marwis1978
I have a following table -+ day | quantity -+ where day is a date and quantity is an integer value. Now I need to make a SELECT statement on this table which returns me a full information on a whole month, it means day>='2007-10-01' and day <'2007-11-01' but if there is no

[GENERAL] PostgreSQL Storage: Sorted by Primary Key?

2007-10-08 Thread michi
Does PostgreSQL store records sorted by primary key? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] PostgreSQL Storage: Sorted by Primary Key?

2007-10-08 Thread michi
Hi Rainer and Christopher, Thank you for your quick responses. I didn't know about CLUSTER command. It seems like just what I needed! Thanks! --Michi ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] starting a stored procedure+rule AFTER an insert

2007-10-08 Thread Bima Djaloeis
Hi, Newbie here, I have implemented a stored procedure that writes out the newest DB entry on insert, and combined it with a rule. 1) create function newcache() returns void AS 'newCache', 'newCache' language c; 2) create rule newcacherule AS on insert to caches do also select newcache(); The pr

Re: [GENERAL] Very asynchrnous replication system

2007-10-08 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I must replicate (or synchronise) data between disconnected > postgreSQL databases ... hence a replication "very asynchronous"! Check out Bucardo (http://bucardo.org). It should be able to do what you want with a "swap" sync (master-master)

Re : [GENERAL] Very asynchrnous replication system

2007-10-08 Thread Laurent ROCHE
Ben, As far as I can see MusicBrainz only does one way replication (which I already achieved). Two ways replication (without re-sending the information you have just received) is a bit more complex. I could not find much info on the MusicBrainz project anyway. Thanks, [EMAIL PROTECTED] The C