[GENERAL] Understanding how partial indexes work?

2007-12-05 Thread Chris Velevitch
I have a query on a table:- X between k1 and k2 or X < k1 and Y <> k3 where k1, k2, k3 are constants. How would this query work, if I created an index on X and a partial index on X where Y <> k3? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 ww

Re: [GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Tom Lane
Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > ... BTW I saw there is no OWNED BY in 8.1, is there any other way to > auto-drop sequences when columns get dropped? In previous versions, a sequence object that was auto-created as a result of a SERIAL column declaration will be auto-dropped whe

Re: [GENERAL] 7.4 end of life

2007-12-05 Thread Tom Lane
"Chris Velevitch" <[EMAIL PROTECTED]> writes: > Where can I find information on when support for 7.4.x formally cease? Nowhere, because that decision has not been made. We're having trouble enough deciding when to cut off 7.3.x: http://archives.postgresql.org/pgsql-hackers/2007-11/msg01110.php A

Re: [GENERAL] 7.4 end of life

2007-12-05 Thread Joshua D. Drake
Chris Velevitch wrote: Where can I find information on when support for 7.4.x formally cease? This has yet to be determined. However you can expect that it will be considered in the next 12 to 18 months. We are about to EOL 7.3. Sincerely, Joshua D. Drake Chris --

Re: [GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Tom Lane
"Bryan Murphy" <[EMAIL PROTECTED]> writes: > When we run pg_dump on our database, our web site becomes completely > unresponsive. ... > Does pg_dump create table locks? It doesn't look like an I/O problem > as far as I can tell... Only access-share locks, but that could still be an issue if anyth

[GENERAL] 7.4 end of life

2007-12-05 Thread Chris Velevitch
Where can I find information on when support for 7.4.x formally cease? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group m: 0415 469 095 www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] WAL shipping question

2007-12-05 Thread Greg Smith
On Wed, 5 Dec 2007, SHARMILA JOTHIRAJAH wrote: I see the archive directory in standby server getting filled up, but there are no log messages generated. Whay? What am I missing here? If you're using pg_standby, you can pass it -d to have it log more information about what's going on, which ma

Re: [GENERAL] libpq messages language

2007-12-05 Thread Efraín López
Thank you for your reply but I got the error 'LC_MESSAGES' : undeclared identifier locale.h only defines LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME I tried to set a system variable LC_MESSAGES, but didn't work Then, I tried to find more information In libpq, when ENABLE_NLS is no

Re: [GENERAL] storage size of "bit" data type..

2007-12-05 Thread Michael Glaesemann
On Dec 5, 2007, at 14:19 , Alex Mayrhofer wrote: Hi, i'm trying to find out the storage size for bit(n) data. My initial assumption would be that for any 8 bits, one byte of storage is required. select pg_column_size(B'1') as "1bit", pg_column_size(B'') as "4bits", pg_c

Re: [GENERAL] pgAccess for PostgreSQL 8.2.5

2007-12-05 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 05 Dec 2007 16:50:27 -0800 Kandy Wong <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like to ask if there is a version of pgAccess that works with > PostgreSQL 8.2.5 for CentOS 4, RHEL4 or SL4 which allows creating and > editing tables in GUI? p

[GENERAL] pgAccess for PostgreSQL 8.2.5

2007-12-05 Thread Kandy Wong
Hi, I'd like to ask if there is a version of pgAccess that works with PostgreSQL 8.2.5 for CentOS 4, RHEL4 or SL4 which allows creating and editing tables in GUI? Thank you. Kandy ---(end of broadcast)--- TIP 9: In versions below 8.0, the plann

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-05 Thread Bill Moran
In response to "Andrus" <[EMAIL PROTECTED]>: > Thank you very much for quick reply. Keep the mailing list included in this discussion. > > can you please give us the types of dok.kuupaev and dok.kellaaeg? I > > think a simple fix is possible here. > > dok.kuupaev type is DATE > > dok.kellaae

Re: [GENERAL] Nested loop in simple query taking long time

2007-12-05 Thread Henrik Zagerholm
5 dec 2007 kl. 16.25 skrev Tom Lane: Henrik Zagerholm <[EMAIL PROTECTED]> writes: Usually I can see what is wrong with queries but I can't figure out why this query is slow. Seems the main problem is here: -> Bitmap Index Scan on tbl_archive_idx1 (cost=0.00..1150.47 ro

Re: [GENERAL] Re-partitioning huge schema

2007-12-05 Thread Erik Jones
Rober, Thank you once again for your input. On Dec 5, 2007, at 3:23 PM, Robert Treat wrote: On Monday 03 December 2007 17:32, Erik Jones wrote: Too much to keep quoted here. Check the archives if you want to read more about the setup for this conversation. -[ RECORD 1 ]+

Re: [GENERAL] Re-partitioning huge schema

2007-12-05 Thread Robert Treat
On Monday 03 December 2007 17:32, Erik Jones wrote: > Hi, I've inherited a database schema wherein the original > developers took the inheritance mechanism to an extreme where new > client accounts get 13 different tables of their own created for > them. We're at the many tens of thousands of tab

Re: [GENERAL] WAL shipping question

2007-12-05 Thread Erik Jones
On Dec 5, 2007, at 1:39 PM, SHARMILA JOTHIRAJAH wrote: > This basically archives the data in the primary server itself...right!!! > But how can I set up continuous archiving from primary to a directory > (WAL archive directory) on the stand-by server ? >>The closest thing to a worked out

Re: [GENERAL] WAL shipping question

2007-12-05 Thread SHARMILA JOTHIRAJAH
> This basically archives the data in the primary server itself...right!!! > But how can I set up continuous archiving from primary to a directory > (WAL archive directory) on the stand-by server ? >>The closest thing to a worked out example of how to do this I'm aware of >>is at http://ar

[GENERAL] storage size of "bit" data type..

2007-12-05 Thread Alex Mayrhofer
Hi, i'm trying to find out the storage size for bit(n) data. My initial assumption would be that for any 8 bits, one byte of storage is required. Is this assumption correct? I didn't find that information in the online docs. thanks, Alex ---(end of broadcast)--

[GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Ivan Sergio Borgonovo
I've to fill something like: create table DESTtable1 ( pk1 serial primary key, -- rest of stuff ); create table DESTtable2 ( pk2 serial primary key, fk1 int references DESTtable1(pk1) -- rest of stuff ); from data that are such way create table SRCtable1 ( pk1 serial primary key, -- r

Re: [GENERAL] Older version of PGSQL help

2007-12-05 Thread Andrew Sullivan
On Wed, Dec 05, 2007 at 12:53:45AM -0500, Greg Smith wrote: > The issue Andrew is bringing up here is that really new PostgreSQL > versions probably aren't necessairly backward compatible talking to or > reading dumps from your 7.0 system, so your odds are better trying to > upgrade to 7.3 inste

Re: [GENERAL] 8.3 beta FATAL: invalid value for parameter "timezone_abbreviations": "Default"

2007-12-05 Thread marcelo Cortez
Alvaro ,folks --- Alvaro Herrera <[EMAIL PROTECTED]> escribió: > marcelo Cortez escribió: > > folks > > > > > > i've installed 8.3beta but at start up receive > > > > FATAL: invalid value for parameter > > "timezone_abbreviations": "Default" > > Do you have a file named "Default" on the >

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2007-12-05 Thread Erik Jones
On Dec 5, 2007, at 7:50 AM, Robert Treat wrote: On Wednesday 05 December 2007 07:22, Alvaro Herrera wrote: Robert Treat wrote: On Monday 03 December 2007 20:22, Erik Jones wrote: Interesting. If this is anything you'd like to look into I can provide whatever diagnostic output you need (iosta

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2007-12-05 Thread Erik Jones
On Dec 5, 2007, at 7:50 AM, Robert Treat wrote: On Wednesday 05 December 2007 07:22, Alvaro Herrera wrote: Robert Treat wrote: On Monday 03 December 2007 20:22, Erik Jones wrote: Interesting. If this is anything you'd like to look into I can provide whatever diagnostic output you need (iost

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-05 Thread Alvaro Herrera
John Wells wrote: > On 12/5/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > John Wells wrote: > > > > > I have pg_filedump installed, but can't figure out how to dump the > > > rows themselves. I get the equivalent of the output at the end of this > > > post. Looking over the --help, there's noth

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-05 Thread Alvaro Herrera
John Wells wrote: > I have pg_filedump installed, but can't figure out how to dump the > rows themselves. I get the equivalent of the output at the end of this > post. Looking over the --help, there's nothing obvious that has gotten > me further. -i is the option you need; but you have to keep in

Re: [GENERAL] 8.3 beta FATAL: invalid value for parameter "timezone_abbreviations": "Default"

2007-12-05 Thread Alvaro Herrera
marcelo Cortez escribió: > folks > > > i've installed 8.3beta but at start up receive > > FATAL: invalid value for parameter > "timezone_abbreviations": "Default" Do you have a file named "Default" on the share/timezonesets dir? I'm wondering if your installation is being mistakenly trying t

Re: [GENERAL] 8.3 beta FATAL: invalid value for parameter "timezone_abbreviations": "Default"

2007-12-05 Thread Alvaro Herrera
marcelo Cortez escribió: > folks > > > i've installed 8.3beta but at start up receive > > FATAL: invalid value for parameter > "timezone_abbreviations": "Default" Wow, strange. Mismatching case, perhaps? -- Alvaro Herrerahttp://www.advogato.org/person/alvherre "Cua

Re: [GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Bryan Murphy
On Dec 5, 2007 10:14 AM, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > Pg_dump uses Access Share if I recall. You can operate normally while > running pg_dump. I am having a hard time parsing that. Could you instead > go over to pgsql.privatepaste.com and send back a paste link? http://pgsql.privat

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-05 Thread John Wells
On 12/4/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > On Tue, Dec 04, 2007 at 03:05:53PM -0500, John Wells wrote: > > So, given a database table file that still has records in it, and > > given the fact that these records could be parsed and displayed if the > > proper utilty knew how to

Re: [GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Joshua D. Drake
Bryan Murphy wrote: When we run pg_dump on our database, our web site becomes completely unresponsive. I thought pg_dump was runnable while the database was still being actively used? It is but it assumes you have resources available. Anyway, I'm not entirely sure why, but here's what I'm s

Re: [GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Bryan Murphy
Sorry about the formatting, here's the dump as a text file. Thanks, Bryan On Dec 5, 2007 10:05 AM, Bryan Murphy <[EMAIL PROTECTED]> wrote: > When we run pg_dump on our database, our web site becomes completely > unresponsive. I thought pg_dump was runnable while the database was > still being ac

[GENERAL] pg_dump and server responsiveness

2007-12-05 Thread Bryan Murphy
When we run pg_dump on our database, our web site becomes completely unresponsive. I thought pg_dump was runnable while the database was still being actively used? Anyway, I'm not entirely sure why, but here's what I'm seeing. pg_dump -v database_name | gzip > output_file 25% to 50% CPU usage (4

Re: [GENERAL] initdb - encoding question

2007-12-05 Thread Stephane Bortzmeyer
On Mon, Dec 03, 2007 at 12:51:27PM -0500, Josh Harrison <[EMAIL PROTECTED]> wrote a message of 63 lines which said: > The encoding you selected (UTF8) and the encoding that the > selected locale uses (LATIN1) do not match. Indeed. > Rerun initdb and either do not specify an encoding explicit

[GENERAL] 8.3 beta FATAL: invalid value for parameter "timezone_abbreviations": "Default"

2007-12-05 Thread marcelo Cortez
folks i've installed 8.3beta but at start up receive FATAL: invalid value for parameter "timezone_abbreviations": "Default" any clue? best regards. MDC info: Linux richelet-internet 2.6.21.6 #9 SMP Sun Dec 2 17:52:20 ART 2007 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux gp_confi

Re: [GENERAL] Nested loop in simple query taking long time

2007-12-05 Thread Tom Lane
Henrik Zagerholm <[EMAIL PROTECTED]> writes: > Usually I can see what is wrong with queries but I can't figure out > why this query is slow. Seems the main problem is here: > -> Bitmap Index Scan on tbl_archive_idx1 > (cost=0.00..1150.47 rows=8 width=0) (actual time=150

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2007-12-05 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > But then I thought, why do we need it to be a file > at all? Why not use a mmap'ed memory area or something like that, and > only write it to a file on postmaster shutdown? Yeah, we definitely need some other technology for this. The difficulty is in

Re: [GENERAL] SQL Query

2007-12-05 Thread Stephane Bortzmeyer
On Wed, Dec 05, 2007 at 11:43:08AM +, Steve Grey <[EMAIL PROTECTED]> wrote a message of 153 lines which said: > First work out the maximum number of times each value of X will occur in the > table A better solution, when you do not know this maximum number, is CREATE AGGREGATE (http://www

[GENERAL] elegant way to fill a table with serial

2007-12-05 Thread Ivan Sergio Borgonovo
I've to fill something like: create table DESTtable1 ( pk1 serial primary key, -- rest of stuff ); create table DESTtable2 ( pk2 serial primary key, fk1 int references DESTtable1(pk1) -- rest of stuff ); from data that are such way create table SRCtable1 ( pk1 serial primary key, -- r

Re: [GENERAL] Problem with joining two tables

2007-12-05 Thread Przemyslaw Bojczuk
Thomas Burdairon wrote: > hope this help. Thank you, it helped a lot! It was a part of a bigger problem (involving PostGIS, Mapserver et al.) and I *thought* I traced it down to this join, but now it's clear the problem lies completely elsewhere. Thanks again! PB -- Geographical Information Sys

Re: [GENERAL] Problem with joining two tables

2007-12-05 Thread A. Kretschmer
am Wed, dem 05.12.2007, um 14:42:32 +0100 mailte Przemyslaw Bojczuk folgendes: > Hello! > > I have a problem joining two tables. I tried various types of join and > none seems to work as I expect > > Table 1: > > id | stuff > --- > 1 | sth1 > 2 | sth2 > 3 | sth3 > 4 | sth4 >

Re: [GENERAL] Problem with joining two tables

2007-12-05 Thread Thomas Burdairon
On 5 déc. 07, at 14:42, Przemyslaw Bojczuk wrote: Hello! I have a problem joining two tables. I tried various types of join and none seems to work as I expect Table 1: id | stuff --- 1 | sth1 2 | sth2 3 | sth3 4 | sth4 5 | sth5 .. | ... Table 2: id | desc | etc ---

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2007-12-05 Thread Robert Treat
On Wednesday 05 December 2007 07:22, Alvaro Herrera wrote: > Robert Treat wrote: > > On Monday 03 December 2007 20:22, Erik Jones wrote: > > > Interesting. If this is anything you'd like to look into I can > > > provide whatever diagnostic output you need (iostat, vmstat, dtrace > > > script outpu

[GENERAL] Problem with joining two tables

2007-12-05 Thread Przemyslaw Bojczuk
Hello! I have a problem joining two tables. I tried various types of join and none seems to work as I expect Table 1: id | stuff --- 1 | sth1 2 | sth2 3 | sth3 4 | sth4 5 | sth5 .. | ... Table 2: id | desc | etc -- 1 | desc1 | etc1 2 | desc2 | etc2 2

Re: [GENERAL] Moving pgstat.stat and pgstat.tmp

2007-12-05 Thread Alvaro Herrera
Robert Treat wrote: > On Monday 03 December 2007 20:22, Erik Jones wrote: > > Interesting. If this is anything you'd like to look into I can > > provide whatever diagnostic output you need (iostat, vmstat, dtrace > > script outputs, etc...) but I do have to reiterate that we are an > > extreme co

Re: [GENERAL] SQL Query

2007-12-05 Thread A. Kretschmer
am Wed, dem 05.12.2007, um 3:46:26 -0800 mailte David Fetter folgendes: > Use the array_accum aggregate from the docs as follows: > > SELECT x, array_to_string(array_accum(y),':') > FROM your_table > GROUP BY x; Yes, no noubt a better solution as my new aggregat... Andreas -- Andreas Kretsch

Re: [GENERAL] SQL Query

2007-12-05 Thread David Fetter
On Wed, Dec 05, 2007 at 10:24:04AM +, Ashish Karalkar wrote: > Hello List member, > > Iha a table containing two columns x and y . for single value of x there are > multiple values in y e.g > > XY > > 1ABC > 2PQR > 3 XYZ > 4 LMN > 1

Re: [GENERAL] SQL Query

2007-12-05 Thread Steve Grey
Hi, Its not elegant, and certainly not dynamic or the perfect solution or for anything but a static dataset but I've approached this in SQL before as... First work out the maximum number of times each value of X will occur in the table - something like "select max(subfoo.ycount) from (select foo.

[GENERAL] thesaurus support in postgresql

2007-12-05 Thread Florian Aumeier
Hi, the docs for Full Text Search (pre 8.3: tsearch2) explain how to include a thesaurus dictionary. It also says the current implementation is only an extension of the synonym dictionary with added phrase support. Are there any plans to include a proper thesaurs support, with broader terms

Re: [GENERAL] SQL Query

2007-12-05 Thread A. Kretschmer
am Wed, dem 05.12.2007, um 10:47:44 + mailte Ashish Karalkar folgendes: > > X Y > > > > 1 ABC > > 2 PQR > > 3 XYZ > > 4 LMN > > 1 LMN > > 2 XYZ > > > > I want a query that will give me following output > > > > 1 ABC:LMN > > 2 PQR

Re: [GENERAL] SQL Query

2007-12-05 Thread Ashish Karalkar
"A. Kretschmer" <[EMAIL PROTECTED]> wrote: am Wed, dem 05.12.2007, um 10:24:04 + mailte Ashish Karalkar folgendes: > Hello List member, > > Iha a table containing two columns x and y . for single value of x there are > multiple values in y e.g > > X Y > > 1 ABC > 2

Re: [GENERAL] hibernate + postgresql ?

2007-12-05 Thread Luca Ferrari
On Saturday 1 December 2007 David Fetter's cat, walking on the keyboard, wrote: > You'd only think so if you hadn't actually seen these things in > action. They save no time because of the silly, unreasonable > assumptions underlying them, which in turn cause people to do silly, > unreasonable th

Re: [GENERAL] SQL Query

2007-12-05 Thread A. Kretschmer
am Wed, dem 05.12.2007, um 10:24:04 + mailte Ashish Karalkar folgendes: > Hello List member, > > Iha a table containing two columns x and y . for single value of x there are > multiple values in y e.g > > X Y > > 1 ABC > 2 PQR > 3 XYZ > 4 LMN > 1

[GENERAL] SQL Query

2007-12-05 Thread Ashish Karalkar
Hello List member, Iha a table containing two columns x and y . for single value of x there are multiple values in y e.g XY 1ABC 2PQR 3 XYZ 4 LMN 1 LMN 2 XYZ I want a query that will give me following output 1ABC:LMN 2

Re: [GENERAL] pg_dump: could not format inet value

2007-12-05 Thread Tomas
I'm sorry, it was issue with my PITR replication setup which I think I've fixed now. (race condition between full db backup and pg_dump). Regards, Tomas Simonaitis ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your d

Re: [GENERAL] initdb - encoding question

2007-12-05 Thread Peter Eisentraut
Am Montag, 3. Dezember 2007 schrieb Josh Harrison: > initdb -E en_CA.utf-8 -D /export/home/sjothirajah/postgres8.3/pgsql/data > gives this error > initdb: "en_CA.utf-8" is not a valid server encoding name The option name you want is --locale, not -E. -- Peter Eisentraut http://developer.postgres

Re: [GENERAL] initdb - encoding question

2007-12-05 Thread Peter Eisentraut
Am Montag, 3. Dezember 2007 schrieb Josh Harrison: > initdb -E UTF8 -D /export/home/josh/postgres8.3/pgsql/data > The database cluster will be initialized with locales > COLLATE: en_CA.ISO8859-1 > CTYPE:en_CA.ISO8859-1 > MESSAGES: C > MONETARY: en_CA.ISO8859-1 > NUMERIC: en_CA.ISO8

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-05 Thread Marko Kreen
On 11/29/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > SELECT > pgp_pub_decrypt(dearmor(armor(pgp_pub_encrypt(armor(pgp_sym_encrypt('geheim'::text,'test'::text)),dearmor((SELECT > ens_pubkey FROM ens_user WHERE ens_userid = > 10112)::text,dearmor((SELECT ens_privkey FROM ens_user WHERE > e

[GENERAL] pg_dump: could not format inet value

2007-12-05 Thread Tomas
Hi, I've stumbled on pg_dumpall problem: -- pg_dump: ERROR: could not format inet value: Address family not supported by protocol pg_dump: SQL command to dump the contents of table "elog" failed: PQendcopy() failed. pg_dump: Error message from server: ERROR: could not format inet value: Addre

[GENERAL] Nested loop in simple query taking long time

2007-12-05 Thread Henrik Zagerholm
Hello list, Usually I can see what is wrong with queries but I can't figure out why this query is slow. Below is query and explain analyze output. Any help would be appreciated. EXPLAIN ANALYZE SELECT computer_name FROM tbl_computer INNER JOIN tbl_share ON pk_computer_id = tbl_share.fk_comput

Re: [GENERAL] Server crashed and now experiencing slow running queries

2007-12-05 Thread Peter Childs
On 05/12/2007, Keaton Adams <[EMAIL PROTECTED]> wrote: > > > We're running PostgreSQL 8.1.4 on RHEL. I'm running a vacuum analyze on > the mxl_fs_size table to see if that shows anything. > > -Keaton > > > On 12/4/07 10:50 PM, "Keaton Adams" <[EMAIL PROTECTED]> wrote: > > > We have two servers con