[GENERAL] PG compilation

2007-01-10 Thread km
Hi, I would like to know if there is a way to pass an argument to ./configure to consider compiling with a specific python version ? coz i have many python versions in the system .I presume that configure would check for the /usr/bin/python alone, but what if i want /usr/bin/python2.5 to be com

Re: [GENERAL] Moving the database from winxp to linux

2007-01-10 Thread Tomas Lanczos
> [mailto:[EMAIL PROTECTED] On Behalf Of Chris > > Tomas Lanczos wrote: > > I am planning within few week to migrate the existing 8.1.4 > postgresql > > database from winxp to 8.2 postgresql installed on linux > (ubuntu). Is > > there any good tutorial for the task like this, event. do have >

Re: [GENERAL] Autovacuum Improvements

2007-01-10 Thread Christopher Browne
A long time ago, in a galaxy far, far away, [EMAIL PROTECTED] (Csaba Nagy) wrote: > On Mon, 2007-01-08 at 22:29, Chris Browne wrote: > [snip] >> Based on the three policies I've seen, it could make sense to assign >> worker policies: >> >> 1. You have a worker that moves its way through the queue

Re: [GENERAL] Moving the database from winxp to linux

2007-01-10 Thread Chris
Tomas Lanczos wrote: I am planning within few week to migrate the existing 8.1.4 postgresql database from winxp to 8.2 postgresql installed on linux (ubuntu). Is there any good tutorial for the task like this, event. do have somebody summarized some tricks and tips, at least? many thanks in adva

Re: [GENERAL] tsearch2 headline() query subselect help

2007-01-10 Thread Jeff Davis
On Wed, 2007-01-10 at 19:14 -0500, John Smith wrote: > guys, > how'd i make this query work? > select headline(select column_1 from table_1 where to_tsvector > (column_1) @@ to_tsquery('ftp'),'ftp'::tsquery); > ERROR: syntax error at or near "select" at character 1

[GENERAL] plpgsql trapping full detail error message

2007-01-10 Thread Radovan Jablonov
Hello, I would like to catch and then log full detailed error message from plpgsql function. I am using currently this method: WHEN OTHERS THEN v_actionstatus_id := 2; IF (v_log_flag = 1) --if 1 then log actions THEN INSERT INTO logdata.logaction(logaction_id, oper_id, act

Re: [GENERAL] tsearch2 headline() query subselect help

2007-01-10 Thread Jeff Davis
On Wed, 2007-01-10 at 19:14 -0500, John Smith wrote: > guys, > how'd i make this query work? > select headline(select column_1 from table_1 where to_tsvector > (column_1) @@ to_tsquery('ftp'),'ftp'::tsquery); > ERROR: syntax error at or near "select" at character 1

[GENERAL] Moving the database from winxp to linux

2007-01-10 Thread Tomas Lanczos
I am planning within few week to migrate the existing 8.1.4 postgresql database from winxp to 8.2 postgresql installed on linux (ubuntu). Is there any good tutorial for the task like this, event. do have somebody summarized some tricks and tips, at least? many thanks in advance and regards Tomas

[GENERAL] tsearch2 headline() query subselect help

2007-01-10 Thread John Smith
guys, how'd i make this query work? select headline(select column_1 from table_1 where to_tsvector(column_1) @@ to_tsquery('ftp'),'ftp'::tsquery); ERROR: syntax error at or near "select" at character 17 when i break it, it works fine, like so # select he

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Richard Broersma Jr
also, if you open up psql, you can type "\d " and it will tell you everything about the view. --- Adam Rich <[EMAIL PROTECTED]> wrote: > > Select * from pg_rules ? > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jeanna Geier > Sent: Wednesd

Re: [GENERAL] How does one perform a case-insenstive query on

2007-01-10 Thread Bruce Momjian
This is already an FAQ. --- Steve Atkins wrote: > > On Jan 10, 2007, at 12:18 PM, Erik Jones wrote: > > > [EMAIL PROTECTED] wrote: > >> Hello, > >> > >> Well, the subject line pretty much says it all. If any clarification

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Adam Rich
Select * from pg_rules ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeanna Geier Sent: Wednesday, January 10, 2007 5:43 PM To: Richard Broersma Jr; pgsql-general Subject: Re: [GENERAL] Problems With VIEWS I guess I have a general question regardi

[GENERAL] Prelink errors?

2007-01-10 Thread Adam Rich
The following log entries are generated by the prelink utility on my RHEL 4 server. I'm using the postgres 8.2.1 rpm binaries from postgresql.org I know prelink is probably unnecessary for postgres, but perhaps this error message could be easy corrected (maybe it's caused by a bug elsewhere?) p

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Jeanna Geier
I guess I have a general question regarding Postgres and RULES -- relative newbie here, especially with these 'custom' functions -- where/how can you view the RULES in Postgres? I use CaseStudio to generate my Schemas/create my Rules and then import them into Postgres to create my tables and views

Re: [GENERAL] Trying to load MySQL data

2007-01-10 Thread Dimitri Fontaine
Hi, Le mercredi 10 janvier 2007 02:54, [EMAIL PROTECTED] a écrit : > I am working on a project where we are converting from MySQL to > Postgres. I figured the easiest way would be to export the MySQL data > as CSV. You could also give pgloader a try. It uses COPY but allows you to load good data

Re: [GENERAL] Postgres Replication

2007-01-10 Thread Ben
Look into heartbeat: http://www.linux-ha.org/HeartbeatProgram The idea is that you have a virtual address to be "the database", and that the primary server configures itself for this address as well as whatever address it would normally have. Then, when you want to switch servers (maybe becau

Re: [GENERAL] replication advice needed

2007-01-10 Thread Casey Duncan
You could use slony for this a couple of ways. One is a simpler more hacky way, another is a bit more involved but perhaps more "correct": For the simple way, setup the source database as a provider and the remote replica as a normal slony subscriber.Don't run the slon daemons all the t

Re: [GENERAL] PostgreSQL Connections?

2007-01-10 Thread Jeff Davis
On Tue, 2007-01-09 at 21:48 -0800, Ashish Karalkar wrote: > Hello All, > I am running PostgresSQL 8.2 on Redhat Linux 4. > When I look for the processes that are using postgres > using ps aux|more > I got lots of Idle processes with servers own IP > address. Can anybody please tell me why this is >

Re: [GENERAL] How does one perform a case-insenstive query on test or char fields

2007-01-10 Thread Chad Wagner
On 9 Jan 2007 13:44:32 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: SELECT * FROM table WHERE thisfield = 'some text'; How would I rewrite this query to search through the table looking at the text in the column "thisfield" for the string "some text" but have it perform a case insensitiv

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Richard Broersma Jr
> 2007-01-10 16:45:33 ERROR: cannot insert into a view > 2007-01-10 16:45:33 HINT: You need an unconditional ON INSERT DO INSTEAD > rule. Also, I see you have this field in your insert rule: new.upgrade_date but I see so upgrade_date in you view's definition. What exactly do you intend to be

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Jeanna Geier
Thanks, Richard! Doing so produced the following message in my log file: 2007-01-10 16:45:33 ERROR: cannot insert into a view 2007-01-10 16:45:33 HINT: You need an unconditional ON INSERT DO INSTEAD rule. That's why I like this forum, people are so knowledgeable, helpful, and quick to answer!

Re: [GENERAL] Problems With VIEWS

2007-01-10 Thread Richard Broersma Jr
> I get an error: "Cannot insert into a view." I > haven't even viewed it, much less attempted to insert into it; and let's say > I could get into it, is there anything wrong with my ON INSERT RULE that > would throw this error? Because on several of my other views, I can get > into them, but not

Re: [GENERAL] Trying to load MySQL data

2007-01-10 Thread Walter Vaughan
[EMAIL PROTECTED] wrote: Hello, I am working on a project where we are converting from MySQL to Postgres. I figured the easiest way would be to export the MySQL data as CSV. I dunno, but unless you don't really care about your data, I'd use something that you have no chance of in your data.

Re: [GENERAL] remove embedded carriage returns

2007-01-10 Thread Jonathan Hedstrom
[EMAIL PROTECTED] wrote: > "SELECT replace(columname, 'chr(13)','') from tablename" Try using chr(13) without the single quotes: SELECT replace(columname, chr(13),'') from tablename or you could use '\r' to get the character: SELECT replace(columname, E'\r','') from tablename -Jonathan begin

Re: [GENERAL] Export to shape file

2007-01-10 Thread Martijn van Oosterhout
On Tue, Jan 09, 2007 at 10:39:05PM -0800, kmohan wrote: > > Hi, > > I am trying to export my spatial data from postgres to shae using pgsql2shp > command. > When i keyed in the syntax pgsql2shp -f pl dcmms plss > It is showing fe_sendauth: no password supplied > Please can some one help me on how

[GENERAL] Problems With VIEWS

2007-01-10 Thread Jeanna Geier
Hello List- I'm having some problems with Views that I'd really appreciate some feedback and ideas on... I have a Java program that we're developing that's a CAD/blueprint program that allows the user to select a room in a building and attach information from the database about that room (i.e. ag

Re: [GENERAL] Trying to load MySQL data

2007-01-10 Thread brian
[EMAIL PROTECTED] wrote: Hello, I am working on a project where we are converting from MySQL to Postgres. I figured the easiest way would be to export the MySQL data as CSV. I'm having a problem importing some of the data. What I have done is exported the MySQL data and then modified it so that

Re: [GENERAL] How does one perform a case-insenstive query on test

2007-01-10 Thread Steve Atkins
On Jan 10, 2007, at 12:18 PM, Erik Jones wrote: [EMAIL PROTECTED] wrote: Hello, Well, the subject line pretty much says it all. If any clarification is needed, what I want to do is as follows: SELECT * FROM table WHERE thisfield = 'some text'; How would I rewrite this query to search throu

Re: [GENERAL] How does one perform a case-insenstive query on test

2007-01-10 Thread Erik Jones
[EMAIL PROTECTED] wrote: Hello, Well, the subject line pretty much says it all. If any clarification is needed, what I want to do is as follows: SELECT * FROM table WHERE thisfield = 'some text'; How would I rewrite this query to search through the table looking at the text in the column "thi

Re: [GENERAL] Trying to load MySQL data

2007-01-10 Thread Scott Marlowe
On Tue, 2007-01-09 at 19:54, [EMAIL PROTECTED] wrote: > Hello, > > I am working on a project where we are converting from MySQL to > Postgres. I figured the easiest way would be to export the MySQL data > as CSV. > > I'm having a problem importing some of the data. What I have done is > exported

Re: [GENERAL] Postgres Replication

2007-01-10 Thread dcrespo
Good question. The only concern that I have is the date of the last version (2005-3-7). Do you or anybody know if this software (PGCluster) is stable and works fine? Please, give information on how it fits your needs. Thank you! Daniel km wrote: > On Tue, Jan 09, 2007 at 12:17:20PM -0600, Scott

[GENERAL] Export to shape file

2007-01-10 Thread kmohan
Hi, I am trying to export my spatial data from postgres to shae using pgsql2shp command. When i keyed in the syntax pgsql2shp -f pl dcmms plss It is showing fe_sendauth: no password supplied Please can some one help me on how to import it to shape file. Thanks and Regards, Krishna Mohan -- Vie

Re: [GENERAL] Postgres Replication

2007-01-10 Thread dcrespo
Thank you, Ben, for your reply. I have read the FAQ of DRBD, but I'm still wondering how an application accessing a database server knows when to switch to the mirror (setting this one as the master). I think I should have an application that provides the connection transparently which determines

[GENERAL] How does one perform a case-insenstive query on test or char fields

2007-01-10 Thread af300wsm
Hello, Well, the subject line pretty much says it all. If any clarification is needed, what I want to do is as follows: SELECT * FROM table WHERE thisfield = 'some text'; How would I rewrite this query to search through the table looking at the text in the column "thisfield" for the string "som

[GENERAL] remove embedded carriage returns

2007-01-10 Thread chwy_nougat
Outputting a SELECT statement's results to ascii file showed me a table with a bunch of embedded carriage return characters in the values. I want to remove the embedded returns, so I read the documentation and tried a few variations on "SELECT replace(columname, 'chr(13)','') from tablename" with n

[GENERAL] Trying to load MySQL data

2007-01-10 Thread [EMAIL PROTECTED]
Hello, I am working on a project where we are converting from MySQL to Postgres. I figured the easiest way would be to export the MySQL data as CSV. I'm having a problem importing some of the data. What I have done is exported the MySQL data and then modified it so that all single quotes (a ' quo

Re: [GENERAL] Recording insert, updates, and deletes

2007-01-10 Thread Scott Marlowe
On Wed, 2007-01-10 at 12:37, Andy Dale wrote: > Hi Brad, > > If i have to create a separate slony replication set, then i cannot do > it this way (i cannot and do not want to have a master-slave(s) > architecture) > > Andy > > On 10/01/07, Brad Nicholson <[EMAIL PROTECTED]> wrote: > On W

[GENERAL] replication advice needed

2007-01-10 Thread Gene
I searched the web sites for advice but came up short on something that looked like what I need. I need to "replicate" a few tables nightly (2am-6am). Each table will have about 1 million new records (~100B each, ~5/second) each day. I have tried using something like a cron job (copy from/copy to

Re: [GENERAL] Recording insert, updates, and deletes

2007-01-10 Thread Andy Dale
Hi Brad, If i have to create a separate slony replication set, then i cannot do it this way (i cannot and do not want to have a master-slave(s) architecture) Andy On 10/01/07, Brad Nicholson <[EMAIL PROTECTED]> wrote: On Wed, 2007-01-10 at 16:51 +0100, Andy Dale wrote: > If anyone can help o

Re: [GENERAL] Postgres Replication

2007-01-10 Thread km
On Tue, Jan 09, 2007 at 12:17:20PM -0600, Scott Marlowe wrote: > > Has anybody researched on this that can point me in the right > > direction? > > You could use possibly use pgpool as long as its caveats aren't a show > stopper (can't insert with random, individual inserts with things like > now(

Re: [GENERAL] Autovacuum Improvements

2007-01-10 Thread Joris Dobbelsteen
>-Original Message- >From: Alvaro Herrera [mailto:[EMAIL PROTECTED] >Sent: dinsdag 9 januari 2007 22:18 >To: Joris Dobbelsteen >Cc: Chris Browne; pgsql-general@postgresql.org >Subject: Re: [GENERAL] Autovacuum Improvements > >Joris Dobbelsteen wrote: > >> Now we have at least one different

Re: [GENERAL] Foreign Key Identification

2007-01-10 Thread Reece Hart
From: Ashish Karalkar * To: pgsql-general ( at ) postgresql ( dot ) org * Subject: Foreign Key Identification * Date: Wed, 10 Jan 2007 08:23:28 -0800 (PST) He

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-10 Thread Scott Marlowe
On Wed, 2007-01-10 at 00:12, John DeSoi wrote: > On Jan 8, 2007, at 2:11 PM, Ron Mayer wrote: > >> If not postgres, what other database could possibly do this, if > >> any? I > >> really don't want to have to write our own RDBMS. :) > > > > Doesn't seem much like a database question. I'd say a

Re: [GENERAL] Foreign Key Identification

2007-01-10 Thread A. Kretschmer
am Wed, dem 10.01.2007, um 12:17:25 -0500 mailte Tom Lane folgendes: > "A. Kretschmer" <[EMAIL PROTECTED]> writes: > > am Wed, dem 10.01.2007, um 8:23:28 -0800 mailte Ashish Karalkar folgendes: > >> Is there any means to list out the foreign key tables > >> which are liked with a primary key? >

Re: [GENERAL] index creation on 7.3

2007-01-10 Thread Scott Marlowe
On Tue, 2007-01-09 at 23:12, Tom Lane wrote: > Scott Marlowe <[EMAIL PROTECTED]> writes: > > On Tue, 2007-01-09 at 17:17, Ben wrote: > > If I create an index on a table that needs to be vacuumed in 7.3, will the > > dead rows get indexed as well? > > > Yes. I think. I'm pretty sure that's still

Re: [GENERAL] Foreign Key Identification

2007-01-10 Thread Tom Lane
"A. Kretschmer" <[EMAIL PROTECTED]> writes: > am Wed, dem 10.01.2007, um 8:23:28 -0800 mailte Ashish Karalkar folgendes: >> Is there any means to list out the foreign key tables >> which are liked with a primary key? > Take a look into the pg_depend - table. I think there's an information_schem

Re: [GENERAL] Recording insert, updates, and deletes

2007-01-10 Thread Brad Nicholson
On Wed, 2007-01-10 at 16:51 +0100, Andy Dale wrote: > If anyone can help or offer advice on how to achieve my objective it > would be greatly appreciated. Slony log shipping will do this -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp. ---(e

Re: [GENERAL] Foreign Key Identification

2007-01-10 Thread A. Kretschmer
am Wed, dem 10.01.2007, um 8:23:28 -0800 mailte Ashish Karalkar folgendes: > Hello All, > Is there any means to list out the foreign key tables > which are liked with a primary key? > > is there any way to get this? Take a look into the pg_depend - table. http://www.postgresql.org/docs/8.1/int

[GENERAL] Foreign Key Identification

2007-01-10 Thread Ashish Karalkar
Hello All, Is there any means to list out the foreign key tables which are liked with a primary key? What i want to do is something as follows: TableA with primary key TableAPK TableB with Foreign key TableAPK TableC with Foreign Key TableAPK Waht i want to get is select tablename from ? wher

Re: [GENERAL] SP in PostgreSQL

2007-01-10 Thread Joshua D. Drake
On Wed, 2007-01-10 at 06:01 -0800, Ashish Karalkar wrote: > Hello All, > I am using PostgreSQL 8.2. > > I am having 2 SP's ,second one is called from the > first one. is there any solution to commit the updates > done by the second SP only?? > > when I wrote commit inside second SP it gives me >

[GENERAL] Recording insert, updates, and deletes

2007-01-10 Thread Andy Dale
Hello, I need to be able to keep track of the number of transactions (the ones that are committed) that i am interested in, which in my case is all insert, update, and deletes performed on tables in the public schema. I have already tried to "select xact_commit from pg_stat_database" but xact_co

Re: [GENERAL] join problem...

2007-01-10 Thread Martijn van Oosterhout
On Wed, Jan 10, 2007 at 04:34:00PM +0100, riki wrote: > Hi, > > i'm trying to extract some info from system catalog tables. > documentation says that i should join columns of different data type. > that is int2[] with int2, array with integer. > how can i make this join work? You can use the ANY(

[GENERAL] join problem...

2007-01-10 Thread riki
Hi, i'm trying to extract some info from system catalog tables. documentation says that i should join columns of different data type. that is int2[] with int2, array with integer. how can i make this join work? thanks http://www.postgresql.org/docs/7.4/static/catalog-pg-constraint.html co

[GENERAL] pg_dump and very slow database

2007-01-10 Thread James Neff
Greetings, I started a process last night that is reading records from one table, applying some business rules (validation) and then moving some data to another table. I had a cron job which I forgot about that ran last night too. This simply executes pg_dump : /usr/local/pgsql/bin/pg_dum

Re: [GENERAL] SP in PostgreSQL

2007-01-10 Thread A. Kretschmer
am Wed, dem 10.01.2007, um 6:01:41 -0800 mailte Ashish Karalkar folgendes: > Hello All, > I am using PostgreSQL 8.2. > > I am having 2 SP's ,second one is called from the > first one. is there any solution to commit the updates > done by the second SP only?? No, you can't. A function is a trans

[GENERAL] SP in PostgreSQL

2007-01-10 Thread Ashish Karalkar
Hello All, I am using PostgreSQL 8.2. I am having 2 SP's ,second one is called from the first one. is there any solution to commit the updates done by the second SP only?? when I wrote commit inside second SP it gives me following error ERROR: SPI_execute_plan failed executing query "commit": SP

Re: [GENERAL] PostgreSQL Connections?

2007-01-10 Thread Shoaib Mir
Can you show us the output for: ps auxwww | grep ^postgres that should explain a little more... - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 1/10/07, Ashish Karalkar <[EMAIL PROTECTED]> wrote: Hello All, I am running PostgresSQL 8.2 on Redhat Linux 4. When I look for the p

Re: [GENERAL] Operator performance question

2007-01-10 Thread Alban Hertroys
Tom Lane wrote: > Alban Hertroys <[EMAIL PROTECTED]> writes: >> My conclusion is that this query time is mostly limited to the somewhat >> complex COUNT expressions. Is there any way to do this more efficiently? > > Offhand I would bet on the bitstring-AND operations being the > bottleneck; you co

Re: [GENERAL] Operator performance question

2007-01-10 Thread Alban Hertroys
Brandon Aiken wrote: > Shouldn't these be using HAVING? > > SELECT COUNT(max_persons) ... > GROUP BY NULL > HAVING max_persons >= 5 AND max_persons <= 8; I don't think so; I need multiple COUNT results for multiple combinations; 5-8 persons isn't the only one. I also need counts for 1-4, 9-12 and

Re: [GENERAL] Discovering time of last database write

2007-01-10 Thread Andy Dale
Hi Erik, Can you elaborate a bit more on what you mean by pg_class, as looking at it i cannot figure out how to get the last write time from the pg_class table. Cheers, Andy On 08/01/07, Erik Jones <[EMAIL PROTECTED]> wrote: Scott Marlowe wrote: > On Mon, 2007-01-08 at 03:26, Andy Dale wrote

[GENERAL] date of table creation

2007-01-10 Thread hubert depesz lubaczewski
hi, is there any way to tell when particular table has been created? i don't see such info in pg_class, but maybe i'm missing something. if there is no such way - would there be any chance that somebody proficient with c would write a patch adding this? best regards, depesz -- http://www.depes