Re: [GENERAL] ERROR: Failed to build any 5-way joins

2007-04-23 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> If I remember correctly, after a few "where's this new release" snafus, >> the order of the day now is to silently release the new version, >> announcing it on -hackers only, until all the ftp mirrors have updated, >> then to announce it publicly whe

Re: [GENERAL] Major differences between 7.1.1 and 7.4.x

2007-04-23 Thread Tino Wildenhain
Mageshwaran schrieb: Hi , can any one tell me the major difference between 7.1.1 and 7.4.x version of postgresql, also please tell me what are things to considered when upgrading postgresql from 7.1.1 to 7.4.x. Please reply me.. All your questions are precicely answered on the postgresql.or

Re: [GENERAL] ERROR: Failed to build any 5-way joins

2007-04-23 Thread Magnus Hagander
> > I must have missed it, but when was 8.2.4 released? I don't recall any > > announcement, and the website still says that 8.2.3 is the latest version. > > > > I'll download 8.2.4 tomorrow and report back on how I get on > > If I remember correctly, after a few "where's this new release" s

Re: [GENERAL] [pgsql] inherits and foreign key problem

2007-04-23 Thread A. Kretschmer
am Tue, dem 24.04.2007, um 10:30:15 +0800 mailte Magicloud Magiclouds folgendes: > Dear all, >I have some tables like below, and now i have one record for each > in simple_texts, simple_directories and side_types. Now I want to > insert one record into sides (from simple_directory to simple_t

Re: [GENERAL] Major differences between 7.1.1 and 7.4.x

2007-04-23 Thread Andrej Ricnik-Bay
On 4/24/07, Tom Lane <[EMAIL PROTECTED]> wrote: Why in the world are you considering an upgrade from a six-year-old release to a three-year-old release? Do yourself a favor and move onto something more or less modern. If 8.2.4 is too bleeding-edge for you, then 8.1.9. He thought about it ... h

Re: [GENERAL] Major differences between 7.1.1 and 7.4.x

2007-04-23 Thread Chris
Mageshwaran wrote: Hi , can any one tell me the major difference between 7.1.1 and 7.4.x version of postgresql, also please tell me what are things to considered when upgrading postgresql from 7.1.1 to 7.4.x. http://www.postgresql.org/docs/8.2/static/release.html Why are you only upgrading t

Re: [GENERAL] Major differences between 7.1.1 and 7.4.x

2007-04-23 Thread Tom Lane
Mageshwaran <[EMAIL PROTECTED]> writes: > can any one tell me the major difference between 7.1.1 and 7.4.x version > of postgresql, Read the release notes. http://developer.postgresql.org/pgdocs/postgres/release.html > also please tell me what are things to considered when upgrading > postgresq

[GENERAL] Regarding WAL

2007-04-23 Thread Mageshwaran
Hi , I want to do replication using WAL , please tell the methods by which log shipping is done ie moving the wal files to slaves and executing it. ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only

[GENERAL] Major differences between 7.1.1 and 7.4.x

2007-04-23 Thread Mageshwaran
Hi , can any one tell me the major difference between 7.1.1 and 7.4.x version of postgresql, also please tell me what are things to considered when upgrading postgresql from 7.1.1 to 7.4.x. Please reply me.. Thanks & Regards J Mageshwaran ** DISCLAIMER ** Information containe

Re: [GENERAL] PG service restart failure (start getting ahead of stop?)

2007-04-23 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > We have a nightly restart of one PG database. Just out of curiosity, what for? I can't imagine any really good reason for just shutting down the postmaster and immediately restarting it. > So it looks like the STOPPING of the service actually succeed

[GENERAL] [pgsql] inherits and foreign key problem

2007-04-23 Thread Magicloud Magiclouds
Dear all, I have some tables like below, and now i have one record for each in simple_texts, simple_directories and side_types. Now I want to insert one record into sides (from simple_directory to simple_text with side_type), but it report error: can not insert or update "sides", against foreig

Re: [GENERAL] where clause help

2007-04-23 Thread Jorge Godoy
Ketema <[EMAIL PROTECTED]> writes: > Man so simple! is your solution the same as: > > num_provisioned < num_products AND (num_open_issues + num_provisioned > + num_canceled) < num_prods > > which is what i finally came up with This can be simplified to "num_open_issues + num_provisioned + nu

Re: [GENERAL] where clause help

2007-04-23 Thread Brent Wood
Ketema wrote: i have a record set like below: num_prods|num_open_issues|num_provisioned|num_canceled 1|0|1|0 2|0|0|2 3|0|1|1 * 2|0|1|1 1|0|0|1 2|0|0|0 * 3|3|0|0 3|0|0|3 3|1|0|2 3|2|0|1 2|0|2|0 Of the list above only row 3 and row 6 should be returned. Plain english definition: With a result

Re: [GENERAL] PG service restart failure (start getting ahead of stop?)

2007-04-23 Thread Brent Wood
George Pavlov wrote: We have a nightly restart of one PG database. Today it failed and I can't seem to understand why and how to prevent this in the future (nor can I reproduce the problem). If you get the PID of the psql server process then invoke a STOP, then have a loop waiting for that P

Re: [GENERAL] where clause help

2007-04-23 Thread Ketema
Man so simple! is your solution the same as: num_provisioned < num_products AND (num_open_issues + num_provisioned + num_canceled) < num_prods which is what i finally came up with ---(end of broadcast)--- TIP 5: don't forget to increase your

Re: [GENERAL] where clause help

2007-04-23 Thread George Pavlov
where num_prods > num_open_issues + num_provisioned + num_canceled if those columns are nullable (which they don't seem to be) you'd have to convert the NULLs (i.e. coalesce(num_canceled,0) ) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Ketema

Re: [GENERAL] Slow query using simple equality operators

2007-04-23 Thread Benjamin Arai
Hi, I upgraded to 8.2.4 but there was no significant change in performance. I did notice that hte query appears to be executed incorrectly. Specifically, it appears to perform each equality operation then perform a bitwise AND. I think it should instead be performing one of the equaliti

[GENERAL] PG service restart failure (start getting ahead of stop?)

2007-04-23 Thread George Pavlov
We have a nightly restart of one PG database. Today it failed and I can't seem to understand why and how to prevent this in the future (nor can I reproduce the problem). We have a line in a shell script that calls "/etc/init.d/postgresql restart". In the shell script's log from this invocation I h

Re: [GENERAL] Slow query using simple equality operators

2007-04-23 Thread Tom Lane
Benjamin Arai <[EMAIL PROTECTED]> writes: > To follow up on my own email, by disabling BitmapScan in my > postgresql.conf the performance seems to be better. Is something > wrong with the query analyzer? I just rewrote choose_bitmap_and() to fix some issues that might be related to this; pleas

Re: [GENERAL] Slow query using simple equality operators

2007-04-23 Thread Benjamin Arai
To follow up on my own email, by disabling BitmapScan in my postgresql.conf the performance seems to be better. Is something wrong with the query analyzer? v=# explain select s_content,textdir from text_search where path_id='1' AND tb_id='P2_TB1';

[GENERAL] where clause help

2007-04-23 Thread Ketema
i have a record set like below: num_prods|num_open_issues|num_provisioned|num_canceled 1|0|1|0 2|0|0|2 3|0|1|1 2|0|1|1 1|0|01 2|0|0|0 3|3|0|0 3|0|0|3 3|1|0|2 3|2|0|1 2|0|2|0 Of the list above only row 3 and row 6 should be returned. Plain english definition: With a result set like above eliminat

Re: [GENERAL] PQerrorMessage: suppress trailing new line?

2007-04-23 Thread Andrej Ricnik-Bay
On 4/24/07, Felix Kater <[EMAIL PROTECTED]> wrote: Hi, the messages returned by PQerrorMessage() contain a trailing new line. So, they doesn't nicely integrate into strings formatted by printf. Is there a way to suppress the trailing new line (except for alloc/copy to a new string)? The alloc

[GENERAL] Slow query using simple equality operators

2007-04-23 Thread Benjamin Arai
Can anybody explain to me why this query is executing so slow? =# explain select s_content,textdir from text_search where path_id='1' AND tb_id='P2_TB1'; QUERY PLAN

Re: [GENERAL] ERROR: Failed to build any 5-way joins]

2007-04-23 Thread Raymond O'Donnell
On 23/04/2007 23:17, Scott Marlowe wrote: If I remember correctly, after a few "where's this new release" snafus, the order of the day now is to silently release the new version, announcing it on -hackers only, until all the ftp mirrors have updated, then to announce it publicly when all the cop

Re: [GENERAL] ERROR: Failed to build any 5-way joins

2007-04-23 Thread Scott Marlowe
On Sun, 2007-04-22 at 17:50, Raymond O'Donnell wrote: > On 21/04/2007 23:41, Tom Lane wrote: > > > This sounds like a known bug in 8.2.x --- it's fixed for 8.2.4. If > > you can still reproduce it with 8.2.4, please provide the test case. > > Hi Tom, thanks for the response. > > I must have mis

Re: [GENERAL] Missing magic block

2007-04-23 Thread Brad Buran
Hi Martijn, Thank you very much for the suggestion: > > CREATE FUNCTION add_one(IN int) > > RETURNS int > > AS 'add_one' > > LANGUAGE C; I corrected this to say: AS 'Project1', 'add_one' And restarted psql (rebooted for that matter as well) and am still getting the same err

Re: [GENERAL] change format of logging statements?

2007-04-23 Thread Alvaro Herrera
Matthew Hixson wrote: > Postgres 8.2.0 is logging statements with variables like $1, $2, etc. > and then on the next line saying: > > DETAIL: parameters: $1 = '100', $2 = '100', $3 = '1003' > > Is it possible to get statements logged with the parameters placed > into the actual query stateme

[GENERAL] change format of logging statements?

2007-04-23 Thread Matthew Hixson
Postgres 8.2.0 is logging statements with variables like $1, $2, etc. and then on the next line saying: DETAIL: parameters: $1 = '100', $2 = '100', $3 = '1003' Is it possible to get statements logged with the parameters placed into the actual query statement so that its more convenient to c

[GENERAL] Problem with encoding (lower() doesn't work)

2007-04-23 Thread Vitaliyi
Steps : export LANG=ru_RU.KOI8-r (locale was set properly) initdb createdb -E WIN tst psql tst < tsearch2.sql psql tst : SET client_encoding to KOI8; create table tst (name text, v tsvector); insert .. update tst set v = to_tsvector(lower(nm)); and i've got capitalized russian text in v (vec

[GENERAL] using Postgres with Sequoia

2007-04-23 Thread Matthew Hixson
I am investigating data replication and failover ideas for a Java web application. I would like the ability to have 2 or more Postgres databases that are kept in synch, with the ability to loose all but 1 database and have the application still function. It seems that Sequoia would work n

Re: [GENERAL] ERROR: Failed to build any 5-way joins

2007-04-23 Thread Raymond O'Donnell
On 21/04/2007 23:41, Tom Lane wrote: This sounds like a known bug in 8.2.x --- it's fixed for 8.2.4. If you can still reproduce it with 8.2.4, please provide the test case. Hi Tom, I've tried it on 8.2.4 and all seems to be well now. Thanks! Ray. ---

[GENERAL] Setting table ids in slony

2007-04-23 Thread Pat Maddox
I want to start using slony for replication, and have a question about setting table IDs when creating replication sets. The docs say that you have to be careful in what IDs you assign to the tables - if there's a relationship between two tables, the parent needs to have a lower ID. So let's tak

Re: [GENERAL] tsearch2 dictionary that indexes substrings?

2007-04-23 Thread Tilmann Singer
* Oleg Bartunov <[EMAIL PROTECTED]> [20070420 11:32]: > >If I understand it correctly such a dictionary would require to write > >a custom C component - is that correct? Or could I get away with > >writing a plpgsql function that does the above and hooking that > >somehow into the tsearch2 config?

Re: [GENERAL] Help debugging a hung postgresql client connection

2007-04-23 Thread Tom Lane
"Venkatraju T.V." <[EMAIL PROTECTED]> writes: > The backtrace for the postgresql backend process at that time: > (gdb) bt > #0 0x00321e6cc5e5 in recv () from /lib64/libc.so.6 > #1 0x005004f6 in secure_read (port=0xa0e0f0, ptr=0x7dc8c0, > len=8192) at /usr/include/bits/socket2.h:35 >

[GENERAL] Mass Update

2007-04-23 Thread Iain Adams
Hi, This is probably a really easy question but I have been toiling with this SQL for ages. Okay I have a table with geom_id and id in, this table is called temp. I also have another table called junctions with a column, old_id. Now old_id corresponds to geom_id. I want to update the junctions tab

[GENERAL] The directory of the postgresql source

2007-04-23 Thread shieldy
where can I get the help of the directory explantation to the postgresql src? I have to do some work about the definition of the internal functions. who can help me ? thankyou! -- View this message in context: http://www.nabble.com/The-directory-of-the-postgresql-source-tf3629629.html#a10135088

Re: [GENERAL] Mass Update

2007-04-23 Thread Niederland
On Apr 23, 4:25 am, Iain Adams <[EMAIL PROTECTED]> wrote: > Hi, > > This is probably a really easy question but I have been toiling with > this SQL for ages. > Okay I have a table with geom_id and id in, this table is called temp. > I also have another table called junctions with a column, old_id.

[GENERAL] Help debugging a hung postgresql client connection

2007-04-23 Thread Venkatraju T.V.
Hi, We have a Python application that spawns multiple threads the write the the database. We are seeing an intermittent problem where one of the threads will "block" seemingly for ever. We saw a similar problem twice with the same signature in a C++ based program as well (but that seems harder to

Re: [GENERAL] Indirect access to data, given table name as a string

2007-04-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/21/07 20:31, Arthaey Angosii wrote: > I want to allow "notes" on any row in any table in my database. A > table row may have multiple notes. Say my tables are "foo," "bar," and > "qux." I want to avoid having a lookup table for each of them > ("f

Re: [GENERAL] selective export for subsequent import (COPY)

2007-04-23 Thread Thomas Pundt
On Monday 23 April 2007 14:56, chrisj wrote: | Wow, how did you discover that? man readline? search for "quoted-insert" Ciao, Thomas -- Thomas Pundt <[EMAIL PROTECTED]> http://rp-online.de/ ---(end of broadcast)--- TIP 4: Have you sear

[GENERAL] PQerrorMessage: suppress trailing new line?

2007-04-23 Thread Felix Kater
Hi, the messages returned by PQerrorMessage() contain a trailing new line. So, they doesn't nicely integrate into strings formatted by printf. Is there a way to suppress the trailing new line (except for alloc/copy to a new string)? Thank You Felix ---(end of broadcast)-

Re: [GENERAL] dollar-quoting trouble

2007-04-23 Thread Karsten Hilbert
On Fri, Apr 20, 2007 at 06:08:36PM +0930, Shane Ambler wrote: > If you do want 2 versions installed (both in different prefix dirs) at > the same time then you probably want to make sure that your shell $PATH > setting includes the path to the newer version of psql and then specify > the full p

Re: [GENERAL] selective export for subsequent import (COPY)

2007-04-23 Thread chrisj
Wow, how did you discover that? Andrew Kroeger wrote: > > Tom Lane wrote: >> chrisj <[EMAIL PROTECTED]> writes: >>> This helped a lot, but ideally I want a tab field delimiter and -F '\t' >>> does >>> not seem to work, any ideas?? >> >> I don't think there's any provision for backslash-notatio

Re: [GENERAL] selective export for subsequent import (COPY)

2007-04-23 Thread Andrew Kroeger
Tom Lane wrote: > chrisj <[EMAIL PROTECTED]> writes: >> This helped a lot, but ideally I want a tab field delimiter and -F '\t' does >> not seem to work, any ideas?? > > I don't think there's any provision for backslash-notation in that > switch; you'd need to type an actual tab character there.

Re: [GENERAL] Auditing a database

2007-04-23 Thread Andreas 'ads' Scherbaum
Hello all, On Thu, 19 Apr 2007 09:27:33 -0400 Kenneth Downs <[EMAIL PROTECTED]> wrote: > Ask the question: can I make sure I always have a complete trail? If > you insert the old row, you will always have the old values and the > table itself holds the new values. In tablelog (http://pgfound