Re: [GENERAL] Selecting from a function(x,y) returning a row-type(sum, prod)

2007-05-02 Thread Heiko Klein
Thanks, my real function is quite expensive, so I don't want it to execute twice. Toms subselect query is therefore exactly what I want, and since it will be hidden in a view, it doesn't matter that it is a long expression. Best regards, Heiko Tom Lane wrote: regression=# select x,y,(f).*

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Richard Huxton
Harpreet Dhaliwal wrote: In this regard, I have to start working on some thesis topic related to the postgres database that we are using in the project. It can be in conjunction with email parsing on unix tools but the theme of the thesis topic should revolve around postgres database. You pro

Re: [GENERAL] Utility of OIDs in postgres

2007-05-02 Thread Richard Huxton
Jasbinder Singh Bali wrote: Hi, What would be the benefit of creating tables with OIDs as against one's not with OIDs Giving a unique identifier to each row inserted has some extra efficiency factor involved or what. OIDs are used by the various system tables. Historically, all user tables had

Re: [GENERAL] STDERR vs. SYSLOG logging

2007-05-02 Thread Andrej Ricnik-Bay
On 5/2/07, David Fetter <[EMAIL PROTECTED]> wrote: I prefer syslog because those logs are better suited for processing by pgfouine and tools like it :) I prefer syslog-ng because I can send the logs of to a central log-host using tcp ... :) Cheers, Andrej ---(end of br

Re: [GENERAL] Server crash on postgresql 8.2.4 with tsearch2

2007-05-02 Thread Philippe Amelant
I'm testing with another snowball stemmer (dutch) and I have the same problem. Backen crash with more than 200 characters in select to_tsvector( again default stemmer (english) work well Are tsearch2 from postgresql 8.2.4 compatible with last stemmer from http://www.snowball.tartarus.org ??

[GENERAL] Postgres 8.3-dev

2007-05-02 Thread Paolo Saudin
I am trying out postgresql-8.3-dev1 on Windows XP SP2 and during the installation, I get the following error during the database cluster initialization : Here the log from initdb.log file : The files belonging to this database system will be owned by user "SYSTEM". This user must also

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alexander Staubo
On 5/2/07, Jamie Deppeler <[EMAIL PROTECTED]> wrote: You might want to check pgcluster out http://pgcluster.projects.postgresql.org/ witch does both. That page will give you the impression that this project is dead and abandoned -- the last update is from early 2005. PGCluster does seem to be a

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Alexander Staubo
On 5/2/07, Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote: I'm kind of new to postgresql and the project that I'm working on currently deals with parsing emails, storing parsed components in postgresql DB and fire triggers on certain inserts that opens socket connection with a unix tools server, A

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alvaro Herrera
Alexander Staubo wrote: > On 5/2/07, Jamie Deppeler <[EMAIL PROTECTED]> wrote: > >You might want to check pgcluster out > >http://pgcluster.projects.postgresql.org/ witch does both. > > That page will give you the impression that this project is dead and > abandoned -- the last update is from earl

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alexander Staubo
On 5/2/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Alexander Staubo wrote: > On 5/2/07, Jamie Deppeler <[EMAIL PROTECTED]> wrote: > >You might want to check pgcluster out > >http://pgcluster.projects.postgresql.org/ witch does both. > > That page will give you the impression that this project i

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alvaro Herrera
Alexander Staubo wrote: > On 5/2/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >Alexander Staubo wrote: > >> On 5/2/07, Jamie Deppeler <[EMAIL PROTECTED]> wrote: > >> >You might want to check pgcluster out > >> >http://pgcluster.projects.postgresql.org/ witch does both. > >> > >> That page will g

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alexander Staubo
On 5/2/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > They're different pages. The first one is horribly out of date; > unfortunately, it is (for me) the first hit on Google, whereas the > PgFoundry project page is the third. Sure, they are different pages, but the first one is supposed to be m

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-02 Thread Alvaro Herrera
Alexander Staubo wrote: > On 5/2/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >> They're different pages. The first one is horribly out of date; > >> unfortunately, it is (for me) the first hit on Google, whereas the > >> PgFoundry project page is the third. > > > >Sure, they are different pages

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Scott Marlowe
On Wed, 2007-05-02 at 08:00, Alexander Staubo wrote: > On 5/2/07, Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote: > > I'm kind of new to postgresql and the project that I'm working on currently > > deals with parsing emails, storing parsed components in postgresql DB and > > fire triggers > > on certa

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Martin Gainty
Good Morning Scott- The following URL contains the directive to Move Partition in a Partitioned Tables http://www.csee.umbc.edu/help/oracle8/server.815/a67772/partiti.htm you will then need to rebuild the indices to point to the new partition Is there some manner of automatically rebuilding th

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Scott Marlowe
On Wed, 2007-05-02 at 10:52, Martin Gainty wrote: > Good Morning Scott- > > The following URL contains the directive to Move Partition in a Partitioned > Tables > http://www.csee.umbc.edu/help/oracle8/server.815/a67772/partiti.htm > you will then need to rebuild the indices to point to the new pa

Re: [GENERAL] Postgres (selection of thesis topic)

2007-05-02 Thread Alexander Staubo
On 5/2/07, Scott Marlowe <[EMAIL PROTECTED]> wrote: We're running Oracle 9 here, and it's even worse than vacuuming. Once a table grows, it stays grown until you rebuild it (you use the move command, you just don't move it), and if it's filled up it's tablespace, It's been a while since I touc

Re: [GENERAL] multidimensional arrays

2007-05-02 Thread Ketema
On May 1, 10:48 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > Ketema <[EMAIL PROTECTED]> writes: > > Is it possible to access a subarray of a multi dimensional array as a > > whole? > > I think you want an array slice (ie, something with some colons in the > subscripts). See the > manual:http://www.p

Re: [GENERAL] pgsql and Mac OS X

2007-05-02 Thread Michael Glaesemann
On May 1, 2007, at 10:11 , Tom Lane wrote: Michael Glaesemann <[EMAIL PROTECTED]> writes: Not having ARD3 myself, anyone happen to know which version of PostgreSQL Apple's shipping with version 3? My ARD2 installation is running 7.3.3. The Mini I bought last summer seems to have 7.3.10 insta

[GENERAL] Have I b0rked something? Slow comparisons on "where x in (...)"

2007-05-02 Thread Stephen Harris
Postgres version 8.0.9 on Solaris 2.8. I know it's old but... I have a table with a million rows. I need to select data from this table based on an indexed column; I need to select 600 possible values from the column, returning around 24,000 rows of data. In perl I have a hash which has 600 key

Re: [GENERAL] Have I b0rked something? Slow comparisons on "where x in (...)"

2007-05-02 Thread Dann Corbit
Have you done a vacuum on the table recently? I would be curious to see how: select stuff from table where index_key = AND non_index_row in ('xyz','abc','def') UNION ALL select stuff from table where index_key = AND non_index_row in ('xyz','abc','def') ... UNION ALL select stuff from table w

Re: [GENERAL] Have I b0rked something? Slow comparisons on "where x in (...)"

2007-05-02 Thread Stephen Harris
On Wed, May 02, 2007 at 12:45:08PM -0700, Dann Corbit wrote: > Have you done a vacuum on the table recently? We vacuum daily and cluster weekly after the nightly activities have been performed. > IN list, then the IN list might benefit from a bit of analysis for The IN list is just a set of inte

[GENERAL] forcing use of a specific (expression) index?

2007-05-02 Thread Dan Weber
I've got a table with about 15 columns and 200,000 rows. I have indexes on a lot of my columns, but postgres doesn't seem to be grabbing the ideal index -- in this case, an expression index that exactly matches my WHERE clause. I have the following query: SELECT columns FROM my_table WHERE (boo

Re: [GENERAL] forcing use of a specific (expression) index?

2007-05-02 Thread Tom Lane
"Dan Weber" <[EMAIL PROTECTED]> writes: > I have the following query: > SELECT columns FROM my_table WHERE (bool_1 or int_1 = 0) > AND (int_2 IS NULL) AND (int_3 IS NULL) AND (protocol = > 2) ORDER BY id LIMIT 1; > I made an expression index specifically for that where clause: > CREATE INDEX spe

Re: [GENERAL] Have I b0rked something? Slow comparisons on "where x in (...)"

2007-05-02 Thread Tom Lane
Stephen Harris <[EMAIL PROTECTED]> writes: > Postgres version 8.0.9 on Solaris 2.8. I know it's old but... > I have a table with a million rows. > I need to select data from this table based on an indexed column; I need > to select 600 possible values from the column, returning around 24,000 > ro

Re: [GENERAL] Utility of OIDs in postgres

2007-05-02 Thread Brent Wood
Richard Huxton wrote: Jasbinder Singh Bali wrote: Hi, What would be the benefit of creating tables with OIDs as against one's not with OIDs Giving a unique identifier to each row inserted has some extra efficiency factor involved or what. OIDs are used by the various system tables. Histor

Re: [GENERAL] Utility of OIDs in postgres

2007-05-02 Thread Steve Atkins
On May 2, 2007, at 3:58 PM, Brent Wood wrote: Richard Huxton wrote: OIDs are used by the various system tables. Historically, all user tables had them too. There's no reason to use them in a new system - they offer no advantages over an ordinary integer primary-key. Generally this is cor

[GENERAL] C functions under windows

2007-05-02 Thread Islam Hegazy
Hi all I have postgresql server installed on a windows machine and I want to retrieve data using C functions. I followed the steps in the documentation but it didn't work for windows. I created a .dll projects for my functions but postgres.h calls .h files that I can't find on the windows machi

[GENERAL] Update violating constraint

2007-05-02 Thread Naz Gassiep
Hi, I'm trying to do an update on a table that has a unique constraint on the field, I need to update the table by setting field = field+1 however if this does not perform the updates on the table in a proper order (from last to first) then the update will cause a violation of the index *durin

Re: [GENERAL] Update violating constraint

2007-05-02 Thread Michael Glaesemann
On May 2, 2007, at 23:01 , Naz Gassiep wrote: I'm trying to do an update on a table that has a unique constraint on the field, I need to update the table by setting field = field+1 however if this does not perform the updates on the table in a proper order (from last to first) then the upda

Re: [GENERAL] Update violating constraint

2007-05-02 Thread Naz Gassiep
Michael Glaesemann wrote: > > On May 2, 2007, at 23:01 , Naz Gassiep wrote: > >> I'm trying to do an update on a table that has a unique constraint >> on the field, I need to update the table by setting field = field+1 >> however if this does not perform the updates on the table in a proper >>

Re: [GENERAL] pgsql and Mac OS X

2007-05-02 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On May 1, 2007, at 10:11 , Tom Lane wrote: >> The Mini I bought last summer seems to have 7.3.10 installed on it. >> Don't know where to look to determine the ARD version. > I should think you only have the Remote Desktop PostgreSQL server > insta

Re: [GENERAL] C functions under windows

2007-05-02 Thread Magnus Hagander
Are you building with the same compiler as the backend was built with? If you're using the binary distribution that means mingw unless you're testing the pre-beta snapshot Dave uploaded a few days ago. /Magnus --- Original message --- From: Islam Hegazy <[EMAIL PROTECTED]> Sent: 5-2-'0