Re: [GENERAL] tsearch2 parser configuration

2007-02-07 Thread Hannes Dorbath
On 06.02.2007 21:39, Worky Workerson wrote: Is it possible to configure the tsearch2 parser? I'd like a very dumb parser that splits on everything that is not [a-zA-Z0-9.]. The default parser seems to work well on my dataset except for the '/' character ... it doesn't split mike/john into two l

[GENERAL] invalid page header in pg_statistic

2007-02-07 Thread Ed L.
. TIA. Ed *** * PostgreSQL File/Block Formatted Dump Utility - Version 3.0 * * File: 16408.backup-20070207-01:11:58PST * Options used: -y -f -R 110 110 * * Dump created on: Wed Feb 7 01:

Re: [GENERAL] Limit for number of Joins in a View? Version 8.1.4 on Redhat 9

2007-02-07 Thread Richard Huxton
[EMAIL PROTECTED] wrote: I am wondering what the limit is on the number of joins in a View or a Select. Background: I have many tables with similar flags such as Active, Inactive, High, Medium, Low. I am storing the flags in a flag table and then putting an int4 foreign key to the flag in the

Re: [GENERAL] invalid page header in pg_statistic

2007-02-07 Thread Martijn van Oosterhout
On Wed, Feb 07, 2007 at 03:00:20AM -0700, Ed L. wrote: > How do I fix this 7.4.6 issue short of initdb? > > invalid page header in block 110 of relation "pg_statistic" Take a copy of the file, then you should be able to truncate it. There's also the zero_damaged_pages option, though I don't

Re: [GENERAL] invalid page header in pg_statistic

2007-02-07 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > How do I fix this 7.4.6 issue short of initdb? > invalid page header in block 110 of relation "pg_statistic" > I looked at the block via pg_filedump (included below), and it > does not appear to me to be corrupted, so not sure what I would > zero out, i

Re: [GENERAL] Limit for number of Joins in a View? Version 8.1.4 on Redhat 9

2007-02-07 Thread MargaretGillon
>Richard Huxton wrote on 02/07/2007 01:33:05 AM: > [EMAIL PROTECTED] wrote: > > I am wondering what the limit is on the number of joins in a View or a > > Select. > > > > Background: I have many tables with similar flags such as Active, > > Inactive, High, Medium, Low. I am storing the flags i

Re: [GENERAL] Postgres training down under.

2007-02-07 Thread Chander Ganesan
Paul Lambert wrote: Are there any companies in the great land of Australia that offer Postgres training courses? I see a number listed for around the US on the postgresql.org website - just curious if anything similar goes on down under. Cheers, P. I believe that Fujitsu offers PostgreSQL t

Re: [GENERAL] Postgres training down under.

2007-02-07 Thread Chander Ganesan
Paul Lambert wrote: Are there any companies in the great land of Australia that offer Postgres training courses? I see a number listed for around the US on the postgresql.org website - just curious if anything similar goes on down under. Cheers, P. Sorry, that apparently got sent out premat

[GENERAL] Installing PostgreSQL on Windows XP

2007-02-07 Thread Christian Henning
Hi there, first post. I would like to share a solution for Windows users having problems installing PostgreSQL 8.2.2. I couldn't find anything in the docs and FAQ. My installation routine went fine until it tried to start the postgres service. This failed and there was no hint of why. So went to

Re: [GENERAL] Limit for number of Joins in a View? Version 8.1.4 on Redhat 9

2007-02-07 Thread MargaretGillon
>Richard Huxton wrote on 02/07/2007 01:33:05 AM: > [EMAIL PROTECTED] wrote: > > I am wondering what the limit is on the number of joins in a View or a > > Select. > > > > Background: I have many tables with similar flags such as Active, > > Inactive, High, Medium, Low. I am storing the flags

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Bernd Helmle
On Tue, 06 Feb 2007 21:28:49 +0100, Tomas Vondra <[EMAIL PROTECTED]> wrote: > > We're using sequence to generate the sessions(id) value, but that should > not be a problem - with the structure / rules everything works fine (the > current value in sessions_id_seq is about 870 so the values ar

Re: [GENERAL] Limit for number of Joins in a View? Version 8.1.4 on Redhat 9

2007-02-07 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Richard, I have a few questions on the domain. 1) How do I add a domain to an existing table? Can I add it to an existing column or do I need to make a new column with the domain and copy the existing data into it? Try ALTER TABLE ... ALTER COLUMN col TYPE ... http

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Tomas Vondra
> It's likely to be a problem because of multiple evaluations of volatile > expressions > in the rule rewrite systemshort example: > > CREATE TABLE sessions(id SERIAL PRIMARY KEY, value TEXT);^ > CREATE TABLE sessions_100(CHECK(id BETWEEN 1 AND 100), PRIMARY KEY(id)) > INHERITS(sessions);

Re: [GENERAL] Postgres training down under.

2007-02-07 Thread Joshua D. Drake
Paul Lambert wrote: > Are there any companies in the great land of Australia that offer > Postgres training courses? I would be happy to fly to Australia and teach a class :) Sincerely, Joshua D. Drake > > I see a number listed for around the US on the postgresql.org website - > just curious i

[GENERAL] Database corruption.

2007-02-07 Thread Michael Guerin
Hi, Our database filled up and now I'm getting this error on one of the tables. Is there any way to recover from this? Please let me know if more information is needed. pg_version version ---

Re: [GENERAL] Database corruption.

2007-02-07 Thread Michael Guerin
Also, all files in pg_clog are sequential with the last file being 0135. Michael Guerin wrote: Hi, Our database filled up and now I'm getting this error on one of the tables. Is there any way to recover from this? Please let me know if more information is needed. pg_version

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Martijn van Oosterhout
On Wed, Feb 07, 2007 at 08:09:57PM +0100, Tomas Vondra wrote: > But I don't understand why the nextval('sessions_id_seq') is evaluated > multiple times? Even when I do RULE expand like macros, so every expression passed in is simply copied to each place, leading to multiple evaluations. If you've

[GENERAL] a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why

2007-02-07 Thread rob_spellberg
[ if this belongs on another list, such as -advocacy, i apologize. ] dear sir or madam --- permit me to submit a plan which, imho, will transform the recent lemon into lemonade. we all know the famous motto, "there is no such thing as a total failure. it can always serve as a negative exa

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Tomas Vondra
>> But I don't understand why the nextval('sessions_id_seq') is evaluated >> multiple times? Even when I do > > RULE expand like macros, so every expression passed in is simply copied > to each place, leading to multiple evaluations. > > If you've played with the C preprocessor: that has the same

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Tomas Vondra
> I wouldn't call myself a novice, but yes - this surprised me a little. > Now it seems so natural ... I think there should be a clear explanation > / example in the docs about this - I've read the documentation on RULE > sytem several times and as far as I remember. ... and as far as I remember t

Re: [GENERAL] a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why

2007-02-07 Thread Bruce Momjian
The 8.2.2 source code is coming back in 1-2 days once everyone knows they should upgrade to 8.2.3. --- rob_spellberg wrote: > [ if this belongs on another list, such as -advocacy, i apologize. ] > > dear sir or madam --- >

Re: [GENERAL] invalid page header in pg_statistic

2007-02-07 Thread Ed L.
On Wednesday February 7 2007 9:01 am, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > How do I fix this 7.4.6 issue short of initdb? > > invalid page header in block 110 of relation "pg_statistic" > > I looked at the block via pg_filedump (included below), and > > it does not appear t

Re: [GENERAL] a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why

2007-02-07 Thread rob_spellberg
this is good news; i thank you. any chance for 8.1.7? rob Bruce Momjian wrote: The 8.2.2 source code is coming back in 1-2 days once everyone knows they should upgrade to 8.2.3. --- rob_spellberg wrote: [ snip ] --

Re: [GENERAL] a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why

2007-02-07 Thread Bruce Momjian
rob_spellberg wrote: > this is good news; i thank you. > > any chance for 8.1.7? Same, all are coming back. --- > > rob > > > > Bruce Momjian wrote: > > The 8.2.2 source code is coming back in 1-2 days once everyone kn

Re: [GENERAL] Database corruption.

2007-02-07 Thread Tom Lane
Michael Guerin <[EMAIL PROTECTED]> writes: > Also, all files in pg_clog are sequential with the last file being 0135. Hmm, that makes it sound like a plain old data-corruption problem, ie, trashed xmin or xmax in some tuple header. Can you do a "select count(*)" from this table without getting th

Re: [GENERAL] a request for the 8.1.7 and 8.2.2 tarballs and the good reasons why

2007-02-07 Thread rob_spellberg
wonderful! thank you very much. have a great day, one and all. rob Bruce Momjian wrote: rob_spellberg wrote: this is good news; i thank you. any chance for 8.1.7? Same, all are coming back. --- rob Bruce M

Re: [GENERAL] Database corruption.

2007-02-07 Thread Michael Guerin
Hmm, that makes it sound like a plain old data-corruption problem, ie, trashed xmin or xmax in some tuple header. Can you do a "select count(*)" from this table without getting the error? no, select count(*) fails around 25 millions rows. PostgreSQL 8.1RC1 on x86_64-unknown-linux-gnu, com

[GENERAL] 'greatest' function?

2007-02-07 Thread jws
Is there any buil-in function to return the lesser of two numbers? i.e. lesser(100,125) would return 100. Do I need to roll my own? ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an inde

Re: [GENERAL] GPL Licensed Files in 8.1.4

2007-02-07 Thread Bruce Momjian
FYI, getting back to you, both /contrib/userlock and /contrib/dbmirror were removed from the 8.2 source tree. They have been moved to pgfoundry. --- Charles Comiskey wrote: > PostgreSQL 8.1.4 appears to have 2 GPL licensed

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread brian
jws wrote: Is there any buil-in function to return the lesser of two numbers? i.e. lesser(100,125) would return 100. Do I need to roll my own? Which is it--greatest or least? No matter, TFM has something to say about it: http://www.postgresql.org/docs/current/static/functions-math.html#FUNC

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread Adam Rich
I don't see greatest or least anywhere on that page... But they ARE here: http://www.postgresql.org/docs/8.2/interactive/functions-conditional.htm l#AEN13140 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of brian Sent: Wednesday, February 07, 2007 10:07

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread Bruce Momjian
brian wrote: > jws wrote: > > Is there any buil-in function to return the lesser of two numbers? > > > > i.e. lesser(100,125) would return 100. > > > > Do I need to roll my own? > > > > Which is it--greatest or least? > > No matter, TFM has something to say about it: > http://www.postgresql.or

[GENERAL] SQL textbook

2007-02-07 Thread Jan Mura
Hello, I would like to ask for a hint for a good SQL textbook. I don't want just a reference manual but real textbook with a theoretical background so I could to design my databases following the general rules as normal forms and so on. I mean something on the net of course. Thank you Jan Mura

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread jws
> Uh, what function in that table helps him --- I don't see it. I found GREATEST() and LEAST(), which in combination with COALESCE() returns exactly what I needed. I missed it because I was looking for numerical functions. Like so many other things in life, in retrospect, it's completely obvious.

[GENERAL] temp tables in functions?

2007-02-07 Thread jws
Having developed a complex query, I want to wrap it up as a function so that it can take a parameter and return a set of rows. This query is currently written as multiple sql statements that create a few interstitial temp tables that are then joined. If I put this into a function definition, do tho

Re: [GENERAL] Storing database in cluster (Memory)

2007-02-07 Thread roopa perumalraja
>>Hi all, >> >>As I am inserting 100million rows daily into partitioned tables (daily wise), >>it is getting slower. >What is - the inserts? By how much? What tables? What indexes? How are you >inserting these rows? I take my words back as 100million rows. The insert of 20million rows every

Re: [GENERAL] temp tables in functions?

2007-02-07 Thread Bruno Wolff III
On Wed, Feb 07, 2007 at 20:40:09 -0800, jws <[EMAIL PROTECTED]> wrote: > Having developed a complex query, I want to wrap it up as a function > so that it can take a parameter and return a set of rows. This query > is currently written as multiple sql statements that create a few > interstitial t

Re: [GENERAL] Database corruption.

2007-02-07 Thread Tom Lane
Michael Guerin <[EMAIL PROTECTED]> writes: >> Hmm, that makes it sound like a plain old data-corruption problem, ie, >> trashed xmin or xmax in some tuple header. Can you do a "select >> count(*)" from this table without getting the error? >> > no, select count(*) fails around 25 millions rows.

Re: [GENERAL] accidentally deleted user --> postgres

2007-02-07 Thread Shane Ambler
g f wrote: Shane, thanks for the advice. I created the user: net user postgres /add I still get the error. When I try to start the postgres service in windows-->services I get a "The service did not start due to logon failure" As long as the postgres user account is not in the admin group check

Re: [GENERAL] temp tables in functions?

2007-02-07 Thread Shoaib Mir
Something like this will help you: execute immediate 'create temporary table test (a number) on commit drop'; -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/8/07, Bruno Wolff III <[EMAIL PROTECTED]> wrote: On Wed, Feb 07, 2007 at 20:40:09 -0800, jws <[EMAIL PROTECTED]> wrote: > Havi

Re: [GENERAL] 'greatest' function?

2007-02-07 Thread brian
Adam Rich wrote: I don't see greatest or least anywhere on that page... But they ARE here: http://www.postgresql.org/docs/8.2/interactive/functions-conditional.htm l#AEN13140 Yes--my bad. Wrong page. ---(end of broadcast)--- TIP 4: Have you se

[GENERAL] simplifying SQL

2007-02-07 Thread garry saddington
I have this query which essentially returns records that exist in one table (studentclass) and not another (effortandattainment) to check when teachers have entered their student grades. select distinct(studentclass.studentclassid),classes.subject,studentclass.studentid as classstudent,classes.te

Re: [GENERAL] DBI-Link 2.0

2007-02-07 Thread Hannes Dorbath
On 07.02.2007 17:59, [EMAIL PROTECTED] wrote: Is there any form of manual for DBI-link out there? Any link is greatly appreciated! I think all available documentation comes with it in various README files. Do you have a specific problem? -- Regards, Hannes Dorbath