Re: [GENERAL] Propogating conditions into a query

2005-06-24 Thread Kim Bisgaard
Tom Lane wrote: Kim Bisgaard <[EMAIL PROTECTED]> writes: The reason the first query is not performing is because the query optimizer does not push the conditions down into the sub-queries - right?? Well, it's not the same condition: the WHERE clause is constraining the output variable

[GENERAL] problem calling psql from another program

2005-06-24 Thread Frank Rittinger
Hello list, I have PostgreSQL 8.0 on Windows Server 2000, and wrote a small .NET program that creates a subprocess that executes psql with a sql script as input (psql -U user -f script.sql). This script runs well if I start psql from the command line and execute it there. But within the .NE

[GENERAL] Non-unique index performance

2005-06-24 Thread Sezai YILMAZ
Hello! I have a table eith name person as described below. It has an unique index for id column (it is also primary key) and has an index for parent column. If I run a query with where clause on id column it uses the index (look at the first explain analyze result; it says "Index Scan using.

Re: [GENERAL] Win32 users?

2005-06-24 Thread Richard Huxton
Joe wrote: I see there's a pgsql-cygwin list and a pgsql-hackers-win32 list, but no pgsql-win32 list. I browsed through the pgsql-novice and pgsql-general archives and only saw a few Windows-related posts. Which of those two lists is most appropriate for asking newbie-type questions about the

Re: [GENERAL] Non-unique index performance

2005-06-24 Thread Richard Huxton
Sezai YILMAZ wrote: Hello! I have a table eith name person as described below. It has an unique index for id column (it is also primary key) and has an index for parent column. If I run a query with where clause on id column it uses the index (look at the first explain analyze result; it sa

Re: [GENERAL] Non-unique index performance

2005-06-24 Thread Martijn van Oosterhout
On Fri, Jun 24, 2005 at 11:44:50AM +0300, Sezai YILMAZ wrote: > Hello! > > I have a table eith name person as described below. It has an unique > index for id column (it is also primary key) and has an index for parent > column. > Why the difference of both queries is so dramatical for unique

Re: [GENERAL] Postgres 8.0 windows processes, field testing, and

2005-06-24 Thread Richard Huxton
Scott Goldstein wrote: I had a couple of questions about Postgres 8.0 on Windows platforms: 1. Has Postgres 8.0 seen many field deployments yet? What have been the results? There seems to have been a good take-up. Some people will have been deploying it even before the official release. Accu

Re: [GENERAL] Non-unique index performance

2005-06-24 Thread Sezai YILMAZ
Richard Huxton wrote: Sezai YILMAZ wrote: Hello! I have a table eith name person as described below. It has an unique index for id column (it is also primary key) and has an index for parent column. If I run a query with where clause on id column it uses the index (look at the first expl

Re: [GENERAL] Non-unique index performance

2005-06-24 Thread Richard Huxton
Sezai YILMAZ wrote: Richard Huxton wrote: OK - all very simple. And you've said there are about 580,000 rows. test=> explain analyze select id,name from person where id in ('17201', '338191', '244319', '515209', '20415'); Why are you quoting integers? I qouted them to use indexes. The oth

[GENERAL] Raid and tablespaces configuration

2005-06-24 Thread Himanshu Baweja
Currently my server has two raid controllers both with 5 disks attached:: On raid1: i have the database (RAID 1/0) on raid2: i have the pg_xlog (RAID 0) is this the optimal configuration or do i need to make some changes for better performance Regards Himanshu

Re: [GENERAL] Postgres 8.0 windows processes, field testing, and Hibernate

2005-06-24 Thread Douglas McNaught
Scott Goldstein <[EMAIL PROTECTED]> writes: > I had a couple of questions about Postgres 8.0 on Windows platforms: > > 1. Has Postgres 8.0 seen many field deployments yet? What have been the > results? I have 8.0.2 in production with zero problems. It's not a high-load installation but it's

Re: [GENERAL] Raid and tablespaces configuration

2005-06-24 Thread Douglas McNaught
Himanshu Baweja <[EMAIL PROTECTED]> writes: > Currently my server has two raid controllers both with > 5 disks attached:: > On raid1: i have the database (RAID 1/0) > on raid2: i have the pg_xlog (RAID 0) > > is this the optimal configuration or do i need to make > some changes for better performa

Re: [GENERAL] Problem with catching my own exception messages.

2005-06-24 Thread Michael Fuhr
On Tue, Jun 07, 2005 at 05:49:10PM +0200, Gorodowienko Daniel wrote: > > I want to write a function that returns a raise message catched by: > EXCEPTION > WHEN RAISE_EXCEPTION THEN >RETURN . > If exception was raise like this: > RAISE EXCEPTION 'some exception'; > and I want to get 'so

Re: [GENERAL] multi-languages in a table

2005-06-24 Thread mrix
This may cause troubles to, because sorting is done using LC_COLLATE value, whuch cannot be changed, and is set with initdb. So please consider this limitation before doing any changes. ---(end of broadcast)--- TIP 7: don't forget to increase your

Re: [GENERAL] fields and foreign keys

2005-06-24 Thread mrix
Yeah, thanks! But I've already tried this approach, and it's not quite i need. Because as i understand foreign keys are built on indexes, so i get *index* and corresponding foreign key definition. Well then i have to find out what filed this index "belongs to" (assuming 1 field - 1 index) ---

Re: [GENERAL] Win32 users?

2005-06-24 Thread Tom Lane
Joe <[EMAIL PROTECTED]> writes: > I see there's a pgsql-cygwin list and a pgsql-hackers-win32 list, but > no pgsql-win32 list. I browsed through the pgsql-novice and > pgsql-general archives and only saw a few Windows-related posts. > Which of those two lists is most appropriate for asking newbie-

[GENERAL] Libpq question

2005-06-24 Thread Tony Caduto
Does anyone know if there is a compiled version of libpq.dll (ssl enabled) that does not require libintl-2.dll, libiconv-2.dll Whoever compiled these dlls failed to include version information with them, so it makes it a royal pain to deploy them, and it appears they must be in the system dir

Re: [GENERAL] fields and foreign keys

2005-06-24 Thread Michael Fuhr
On Thu, Jun 23, 2005 at 10:11:15PM -0700, mrix wrote: > > But I've already tried this approach, and it's not quite i need. > Because as i understand foreign keys are built on indexes, so i get > *index* and corresponding foreign key definition. > Well then i have to find out what filed this index "

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Peter Eisentraut
Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: > Thank you for interested in PostgreSQL CE. There is a sample > examination problems page: > > http://osb.sra.co.jp/postgresql-ce/sys/quiz.php?titleid=S74_en Regarding question 3, Select one incorrect statement regarding the installation of

Re: [GENERAL] Non-unique index performance

2005-06-24 Thread Martijn van Oosterhout
On Fri, Jun 24, 2005 at 11:23:54AM +0100, Richard Huxton wrote: > >I qouted them to use indexes. The other method is type casting the > >values to indexed column type. I prefer the quoting method. > > Sorry - this is just plain wrong. > > If you had an int8 column and a value such as 17, then PG

Re: [GENERAL] problem calling psql from another program

2005-06-24 Thread Scott Marlowe
On Fri, 2005-06-24 at 01:57, Frank Rittinger wrote: > Hello list, > > I have PostgreSQL 8.0 on Windows Server 2000, and wrote a small .NET > program that creates a subprocess that executes psql with a sql script > as input (psql -U user -f script.sql). > > This script runs well if I start psql

[GENERAL] create rule ... as on insert

2005-06-24 Thread Omachonu Ogali
I'm using PostgreSQL 7.4.2, and I'm having a little issue with rules. I created a rule to watch for any inserts to table XYZ, and registered a listener. But as I simply do a select on the table, I receive several notifications when nothing has been inserted into the table. db=# create rule xyz_in

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Tatsuo Ishii
> Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: > > Thank you for interested in PostgreSQL CE. There is a sample > > examination problems page: > > > > http://osb.sra.co.jp/postgresql-ce/sys/quiz.php?titleid=S74_en > > Regarding question 3, > > Select one incorrect statement regarding t

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Peter Eisentraut
Am Freitag, 24. Juni 2005 17:06 schrieb Tatsuo Ishii: > Really? I vaguley recall that someone who came from US complained > about the sort order of en locale. I thought English speakers prefer C > locale. I have never seen an English dictionary or other list that sorts A, ... Z, a, ... z and acce

Re: [GENERAL] create rule ... as on insert

2005-06-24 Thread Scott Marlowe
On Fri, 2005-06-24 at 10:05, Omachonu Ogali wrote: > I'm using PostgreSQL 7.4.2, and I'm having a little issue with rules. > > I created a rule to watch for any inserts to table XYZ, and registered > a listener. But as I simply do a select on the table, I receive several > notifications when nothi

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Tom Lane
Jeff Gold <[EMAIL PROTECTED]> writes: > I presented the start and the end of what seemed to my uninformed eye to > be the relevant error messages, since posting all 46.7 megabytes seemed > impolite. :-) According to grep there are 122034 lines that include > the word "index" in any combination

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Joshua D. Drake
Tatsuo Ishii wrote: Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: Thank you for interested in PostgreSQL CE. There is a sample examination problems page: http://osb.sra.co.jp/postgresql-ce/sys/quiz.php?titleid=S74_en Regarding question 3, Select one incorrect statement regarding th

Re: [GENERAL] create rule ... as on insert

2005-06-24 Thread Janning Vygen
Am Freitag, 24. Juni 2005 17:05 schrieb Omachonu Ogali: > I'm using PostgreSQL 7.4.2, and I'm having a little issue with rules. > > I created a rule to watch for any inserts to table XYZ, and registered > a listener. But as I simply do a select on the table, I receive several > notifications when n

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Freitag, 24. Juni 2005 17:06 schrieb Tatsuo Ishii: >> Really? I vaguley recall that someone who came from US complained >> about the sort order of en locale. I thought English speakers prefer C >> locale. > I have never seen an English dictionary o

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Scott Marlowe
On Fri, 2005-06-24 at 10:42, Joshua D. Drake wrote: > Tatsuo Ishii wrote: > >>Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: > >> > >>>Thank you for interested in PostgreSQL CE. There is a sample > >>>examination problems page: > >>> > >>>http://osb.sra.co.jp/postgresql-ce/sys/quiz.php?title

Re: [GENERAL] [HACKERS] [PATCHES] Removing Kerberos 4

2005-06-24 Thread Jim C. Nasby
On Thu, Jun 23, 2005 at 07:34:30PM +0200, Magnus Hagander wrote: > > Has Kerb4 been marked as depricated in the docs at all? If > > not it might be best to just do that and then yank it later. > > Yes, since 7.4. > > http://www.postgresql.org/docs/8.0/static/auth-methods.html#KERBEROS-AUT > H >

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Alvaro Herrera
On Fri, Jun 24, 2005 at 08:42:00AM -0700, Joshua D. Drake wrote: > >>Regarding question 3, > >> > >> Select one incorrect statement regarding the installation of PostgreSQL. > >> > >>2 2. At least 60MB of free disk space is required for compilation. > Number 2 is > also confusing because am I

Re: [GENERAL] fields and foreign keys

2005-06-24 Thread Michael Fuhr
[Please copy the mailing list on replies.] On Fri, Jun 24, 2005 at 05:52:46PM +0300, Marik wrote: > > But what i really need is field this constraint belongs to then... > I'd like to have such result: > CREATE TABLE foo (id integer PRIMARY KEY); > CREATE TABLE bar (fooid integer NOT NULL REFERENC

Re: [GENERAL] startup time

2005-06-24 Thread David Parker
Does pg_ctl status return true even if the database is not ready yet to receive requests? We are using pg_ctl status to tell us if the database is up, but I'm wondering if it could return true, but a client could connect and still get the "FATAL: database is starting up" error? - DAP >"David Par

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Tom Lane
Jeff Gold <[EMAIL PROTECTED]> writes: > Hm. After discussing this with people here we have a hypothesis. The > process that issues the TRUNCATE command does something a little > peculiar: every minute or so twelve distinct functions are overwritten > using CREATE OR REPLACE FUNCTION. Perhaps

Re: [GENERAL] Postgres 8.0 windows processes, field testing, and

2005-06-24 Thread Joe
Richard Huxton wrote: > You will have (assuming the same as on *nix): > 1. Master process - starts all the others > 2. One backend per client > 3. Stats buffer/collector > 4. Auto-vacuum (optional, not really part of the main system yet) It appears that, when started as a Windows service, four

Re: [GENERAL] Win32 users?

2005-06-24 Thread Joe
Tom Lane wrote: Joe <[EMAIL PROTECTED]> writes: I see there's a pgsql-cygwin list and a pgsql-hackers-win32 list, but no pgsql-win32 list. I browsed through the pgsql-novice and pgsql-general archives and only saw a few Windows-related posts. Which of those two lists is most appropriate for as

Re: [GENERAL] Postgres 8.0 windows processes, field testing, and

2005-06-24 Thread Alvaro Herrera
On Fri, Jun 24, 2005 at 04:00:36PM -0400, Joe wrote: > Richard Huxton wrote: > > > You will have (assuming the same as on *nix): > > 1. Master process - starts all the others > > 2. One backend per client > > 3. Stats buffer/collector > > 4. Auto-vacuum (optional, not really part of the main syste

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Tom Lane
Jeff Gold <[EMAIL PROTECTED]> writes: >> I was sort of expecting you to come back and say that you >> thought the process might have done 640K TRUNCATEs over its lifespan, >> but I guess not? > That's possible. The process does twelve TRUNCATEs every minute. The > problem we're talking about se

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Tom Lane
I wrote: > I think we have a suspect --- will go look. Jeff, are you doing CLUSTER operations too? Some preliminary testing says that: 7.4: CLUSTER leaks a pg_temp_nnn relcache entry per call; if table has toast subtable it also leaks a pg_toast_nnn_index entry per call TRUNCATE on a table wit

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Jeff Gold
Tom Lane wrote: I can absolutely, positively say that that dump is not from the parent postmaster. It's a backend. That makes sense. I'm still a bit puzzled about why new clients can't connect when the problem happens, though. Does the parent postmaster need some resource from one of the b

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Jeff Gold
Tom Lane wrote: I was sort of expecting you to come back and say that you thought the process might have done 640K TRUNCATEs over its lifespan, but I guess not? That's possible. The process does twelve TRUNCATEs every minute. The problem we're talking about seems to occur only when the syste

Re: [GENERAL] Postmaster Out of Memory

2005-06-24 Thread Jeff Gold
Tom Lane wrote: I suppose what we are looking at here is some operation that is invalidating a relcache entry but failing to clear it. Hm. After discussing this with people here we have a hypothesis. The process that issues the TRUNCATE command does something a little peculiar: every minute

Re: [GENERAL] startup time

2005-06-24 Thread Tom Lane
"David Parker" <[EMAIL PROTECTED]> writes: > Does pg_ctl status return true even if the database is not ready yet to > receive requests? pg_ctl status just checks that the postmaster process is present. (Until very recently, it wasn't even a bulletproof test for that...) r

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Tatsuo Ishii
> On Fri, Jun 24, 2005 at 08:42:00AM -0700, Joshua D. Drake wrote: > > > >>Regarding question 3, > > >> > > >> Select one incorrect statement regarding the installation of PostgreSQL. > > >> > > >>2 2. At least 60MB of free disk space is required for compilation. > > > Number 2 is > > also con

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Tatsuo Ishii
> Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Am Freitag, 24. Juni 2005 17:06 schrieb Tatsuo Ishii: > >> Really? I vaguley recall that someone who came from US complained > >> about the sort order of en locale. I thought English speakers prefer C > >> locale. > > > I have never seen an Englis

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Jim C. Nasby
On Fri, Jun 24, 2005 at 08:42:00AM -0700, Joshua D. Drake wrote: > Tatsuo Ishii wrote: > >>Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: > >> > >>>Thank you for interested in PostgreSQL CE. There is a sample > >>>examination problems page: > >>> > >>>http://osb.sra.co.jp/postgresql-ce/sys/q

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Christopher Browne
A long time ago, in a galaxy far, far away, [EMAIL PROTECTED] ("Jim C. Nasby") wrote: > On Fri, Jun 24, 2005 at 08:42:00AM -0700, Joshua D. Drake wrote: >> Tatsuo Ishii wrote: >> >>Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: >> >> >> >>>Thank you for interested in PostgreSQL CE. There is

Re: [GENERAL] PostgreSQL Certification

2005-06-24 Thread Marc G. Fournier
On Fri, 24 Jun 2005, Jim C. Nasby wrote: On Fri, Jun 24, 2005 at 08:42:00AM -0700, Joshua D. Drake wrote: Tatsuo Ishii wrote: Am Sonntag, 12. Juni 2005 05:24 schrieb Tatsuo Ishii: Thank you for interested in PostgreSQL CE. There is a sample examination problems page: http://osb.sra.co.jp/po

[GENERAL] PL/pgSQL function to validate UPC and EAN barcodes - works! Improvements?

2005-06-24 Thread Miles Keaton
I've made a PL/pgSQL function to validate UPC and EAN barcodes. It works correctly, but is a little ugly. Wondering if any PL/pgSQL experts can offer some suggestions. (I'm new to PL/pgSQL.) Main questions: #1 - I wanted to add a "0" to the front of the barcode if it was only 12 characters long