Re: [GENERAL] can I define own variables?

2007-10-16 Thread Guy Rouillier
Tom Lane wrote: Guy Rouillier [EMAIL PROTECTED] writes: I set that up, and using the SHOW command returns the set value. I searched the archives and I couldn't identify a way to retrieve these values in a trigger function.

[GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Ow Mun Heng
Does anyone from this list here uses pgagent from pgadmin? it's a job schedular much like cron which is sort of integrated w/ pgadmin3. Only issue which I've found so far which I don't quite like is that to be able to use pgagent, I have to also pull in the entire pgadmin3 incl wxGTK and X. This

[GENERAL] Create artificial key without temp sequence

2007-10-16 Thread Hannes Dorbath
I need to create an artificial key, something that numbers rows of a record set. I used to use temp sequences for that, but as I'm inside pl/pgsql, its OID cache constantly bites me. What other options are there? Thanks in advance. -- Regards, Hannes Dorbath ---(end

Re: [GENERAL] can I define own variables?

2007-10-16 Thread Pavel Stehule
http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADMIN-SET-TABLE Thank you, Tom. Since select current_setting('uservars.user_name') and SHOW uservars.user_name are both PostgreSQL extensions, why not allow them to be used interchangeably? In short, why isn't the

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Dave Page
Ow Mun Heng wrote: Does anyone from this list here uses pgagent from pgadmin? it's a job schedular much like cron which is sort of integrated w/ pgadmin3. Only issue which I've found so far which I don't quite like is that to be able to use pgagent, I have to also pull in the entire

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Ow Mun Heng
On Tue, 2007-10-16 at 09:56 +0100, Dave Page wrote: Ow Mun Heng wrote: Does anyone from this list here uses pgagent from pgadmin? it's a job schedular much like cron which is sort of integrated w/ pgadmin3. Only issue which I've found so far which I don't quite like is that to be able

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Dave Page
Ow Mun Heng wrote: I've only have 1.4.3 version for centos. (and for gentoo) so.. I have to use that version. We have RPMs for later versions on the pgAdmin site - do they not work? Thus far, the only serious issue I've seen with it is that for some reason, I can't or is not able to connect

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Ow Mun Heng
On Tue, 2007-10-16 at 10:35 +0100, Dave Page wrote: Ow Mun Heng wrote: I've only have 1.4.3 version for centos. (and for gentoo) so.. I have to use that version. We have RPMs for later versions on the pgAdmin site - do they not work? I'm not sure. I didn't try and the latest RPM was for

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Dave Page
Ow Mun Heng wrote: I see.. and in the docs, I was told to import pgagent.sql into the postgres DB so I did that. but actually. I want to deploy it to the target DB, let's call it MyDB. Should I have imported it to MyDB instead? No, postgres is normal. You can specify with each job step which

[GENERAL] 8.3 beta problems

2007-10-16 Thread Marek Lewczuk
Hello, I'm testing 8.3beta and I think that there is a problem with gist/gin indexes. The performance of 8.3 is very bad comparing to 8.2. I have a table with an int[] column indexed using gin (or gist with intarray module). Table contains about 1.5m rows, int[] length is from 2 to 6

Re: [GENERAL] pgadmin's pgagent job scheduler

2007-10-16 Thread Ow Mun Heng
On Tue, 2007-10-16 at 11:10 +0100, Dave Page wrote: Ow Mun Heng wrote: I see.. and in the docs, I was told to import pgagent.sql into the postgres DB so I did that. but actually. I want to deploy it to the target DB, let's call it MyDB. Should I have imported it to MyDB instead? No,

Re: [GENERAL] reporting tools

2007-10-16 Thread Geoffrey
Robert James wrote: Can you clarify the need / value added for reporting tool, over just running queries and packaging the output in HTML (with a little CSS for styling, you can get near PDF quality). This can be done in SQL and a tad of PHP (or Ruby). Looking at having someone generate

Re: [GENERAL] 8.3 beta problems

2007-10-16 Thread Marek Lewczuk
Marek Lewczuk pisze: Hello, I'm testing 8.3beta and I think that there is a problem with gist/gin indexes. The performance of 8.3 is very bad comparing to 8.2. I have a table with an int[] column indexed using gin (or gist with intarray module). Table contains about 1.5m rows, int[] length is

Re: [GENERAL] 8.3 beta problems

2007-10-16 Thread Pavel Stehule
2007/10/16, Marek Lewczuk [EMAIL PROTECTED]: Hello, I'm testing 8.3beta and I think that there is a problem with gist/gin indexes. The performance of 8.3 is very bad comparing to 8.2. I have a table with an int[] column indexed using gin (or gist with intarray module). Table contains about

[GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
/From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html Read Committed/ is the default isolation level in PostgreSQL. When a transaction runs on this isolation level, a SELECT query sees only data committed before the query began; it never sees either uncommitted data or

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Peter Eisentraut
Am Dienstag, 16. Oktober 2007 schrieb Nico Sabbi: to me the above sentence sounds inconsistent: it's asserting that both 1) and 2) apply: 1) it never sees ... changes committed during query execution by concurrent transactions What this is supposed to mean is that you don't see changes while

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Trevor Talbot
On 10/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html Read Committed/ is the default isolation level in PostgreSQL. When a transaction runs on this isolation level, a SELECT query sees only data committed before the

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/16/07 07:08, Trevor Talbot wrote: On 10/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html Read Committed/ is the default isolation level in PostgreSQL. When a

[GENERAL] Architecture diagram!

2007-10-16 Thread Farhan Mughal
Can someone send me a link of where can i find the PostgreSQL Architecture Diagram? Seems like it has been removed from the Documentation, also from 7.1 and 7.2's documentation. Pages exist, but the pictures have been removed. Thanks in advance. Regards, Farhan

Re: [GENERAL] Calculation of per Capita on-the-fly - problems with SQL syntax

2007-10-16 Thread Stefan Schwarzer
I suggest using two *date* (or possibly integer) columns for each row and consider each row an year interval (in the mathematical sense, not to be confused with SQL intervals, which are actually durations). Depending on the interval representation you choose (closed-open or closed-closed),

Re: [GENERAL] Calculation of per Capita on-the-fly - problems with SQL syntax

2007-10-16 Thread Michael Glaesemann
On Oct 16, 2007, at 8:09 , Stefan Schwarzer wrote: That is, for one country it can be 1990, for another 1992, for a third 1995. As the actual year is not important (and not always defined), one tries to use this kind of common describer: various. When you don't have the year, put them in

[GENERAL] improvement proposition

2007-10-16 Thread hubert depesz lubaczewski
hi, would it be possible for someone to add last query for pg_stat_activity view? there is a lot of cases that we have idle in transaction sitting for long time, and since we dont log all queries it is next to impossible to tell where in app code the problem lies. it would be very useful to get

Re: [GENERAL] Architecture diagram!

2007-10-16 Thread Bruce Momjian
Farhan Mughal wrote: Can someone send me a link of where can i find the PostgreSQL Architecture Diagram? Seems like it has been removed from the Documentation, also from 7.1 and 7.2's documentation. Pages exist, but the pictures have been removed. How about this:

[GENERAL] PostgreSQL as a backend for Wizcon 9.2

2007-10-16 Thread Chris Mair
Hi, I've been asked whether it's possible to use PostgreSQL as a backend for Wizcon 9.2. I don't know anything about Wizcon, but I'd like to give an answer (for PostgreSQL advocacy reasons). So I'm forwarding the question to this list. Any clues? Bye :) Chris.

Re: [GENERAL] Architecture diagram!

2007-10-16 Thread Farhan Mughal
Thank you Bruce. --Farhan - Original Message From: Bruce Momjian [EMAIL PROTECTED] To: Farhan Mughal [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Tuesday, 16 October, 2007 6:27:28 PM Subject: Re: [GENERAL] Architecture diagram! Farhan Mughal wrote: Can someone send me

Re: [GENERAL] Convert bytea to Float8

2007-10-16 Thread Lee Keel
-Original Message- From: Merlin Moncure [mailto:[EMAIL PROTECTED] Sent: Monday, October 15, 2007 8:22 PM To: Lee Keel Cc: Scott Marlowe; pgsql-general@postgresql.org Subject: Re: [GENERAL] Convert bytea to Float8 This is sounding more and more like a question for the postgis

Re: [GENERAL] PostgreSQL as a backend for Wizcon 9.2

2007-10-16 Thread Scott Marlowe
On 10/16/07, Chris Mair [EMAIL PROTECTED] wrote: Hi, I've been asked whether it's possible to use PostgreSQL as a backend for Wizcon 9.2. I don't know anything about Wizcon, but I'd like to give an answer (for PostgreSQL advocacy reasons). So I'm forwarding the question to this list. Not

Re: [GENERAL] can I define own variables?

2007-10-16 Thread Tom Lane
Guy Rouillier [EMAIL PROTECTED] writes: In short, why isn't the following legal in a PL/pgsql procedure: NEW.user_name := (SHOW uservars.user_name); Because that isn't a legal SQL subexpression. (This isn't really the approved way of using SELECT, either, since what you're writing is a

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Albe Laurenz
Nico Sabbi wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html Read Committed/ [...] to me the above sentence sounds inconsistent: it's asserting that both 1) and 2) apply: 1) it never sees ... changes committed during query execution by concurrent

[GENERAL] RSA PKCS #1 v2.1 functions for PostgreSQL

2007-10-16 Thread Ron Peterson
I've put up working code which implements the RSA PKCS #1 v2.1 public key cryptography standard in PostgreSQL. This includes key generation, encryption/decryption, and signing/verification. http://www.rsa.com/rsalabs/node.asp?id=2125 http://www.yellowbank.com/code/PostgreSQL/y_pkcs/ This is

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Nico Sabbi
Albe Laurenz ha scritto: Nico Sabbi wrote: /From: http://www.postgresql.org/docs/8.2/interactive/transaction-iso.html Read Committed/ [...] to me the above sentence sounds inconsistent: it's asserting that both 1) and 2) apply: 1) it never sees ... changes committed during query

Re: [GENERAL] PostgreSQL as a backend for Wizcon 9.2

2007-10-16 Thread Chris Mair
I've been asked whether it's possible to use PostgreSQL as a backend for Wizcon 9.2. I don't know anything about Wizcon, but I'd like to give an answer (for PostgreSQL advocacy reasons). So I'm forwarding the question to this list. Not one. I'd ask the folks who write the software is they

[GENERAL] Group By question

2007-10-16 Thread Jeff Lanzarotta
Hello, I have a table that looks something like this: SKU Dept Col1 Col2 Col3 --- -- --- --- -- 1112 3 2123 4 3210 1 4201 2 52

Re: [GENERAL] Group By question

2007-10-16 Thread Sam Mason
On Tue, Oct 16, 2007 at 07:46:34AM -0700, Jeff Lanzarotta wrote: Hello, I have a table that looks something like this: SKU Dept Col1 Col2 Col3 --- -- --- --- -- 1112 3 2123 4 32

Re: [GENERAL] PostgreSQL as a backend for Wizcon 9.2

2007-10-16 Thread Scott Marlowe
On 10/16/07, Chris Mair [EMAIL PROTECTED] wrote: I've been asked whether it's possible to use PostgreSQL as a backend for Wizcon 9.2. I don't know anything about Wizcon, but I'd like to give an answer (for PostgreSQL advocacy reasons). So I'm forwarding the question to this list.

Re: [GENERAL] Group By question

2007-10-16 Thread Scott Marlowe
On 10/16/07, Jeff Lanzarotta [EMAIL PROTECTED] wrote: Hello, I have a table that looks something like this: SKU Dept Col1 Col2 Col3 --- -- --- --- -- 1112 3 2123 4 3210

Re: [GENERAL] improvement proposition

2007-10-16 Thread Tom Lane
hubert depesz lubaczewski [EMAIL PROTECTED] writes: would it be possible for someone to add last query for pg_stat_activity view? there is a lot of cases that we have idle in transaction sitting for long time, and since we dont log all queries it is next to impossible to tell where in app

Re: [GENERAL] slow request

2007-10-16 Thread Michael Guiard
Hi ! thanks for your answers My network works correctly, I have no other problems. I can send/receive huge files quickly using the windows file share protocol. Using psql tool, I have the same results ... very slow traffic ... :( I measure these time and speeds using my watch and a free network

[GENERAL] Vista Home Premium Installation troubles...

2007-10-16 Thread HJ Weiden
Hello all, I am [a newbie] trying to install postgres on a machine with a Windows Vista Home Premium OS. All appears to be going well until the very end when it tellme it cannot create user psostgress rolls back the installation. I get the following error message at the end of my

[GENERAL] problem with a column of type timestamp

2007-10-16 Thread Sascha Bohnenkamp
Hi, I have a table of type timestamp. I get the following error when I try to insert som edata to it: PGRES_FATAL_ERROR column birthtime is of type timestamp without time zone but expression is of type time without time zone You will need to rewrite or cast the expression. how can I set the

Re: [GENERAL] pg_dump - schema diff compatibility

2007-10-16 Thread Sualeh Fatehi
SchemaCrawler for PostgreSQL will allow you to do the diffs. With SchemaCrawler for PostgreSQL, you can take human-readable snapshots of the schema and data, for later comparison. SchemaCrawler outputs details of your schema (tables, views, procedures, and more) in a diff- able plain-text format

[GENERAL] variable in COPY table TO variable

2007-10-16 Thread Rob Shepherd
Dear postgres-users, I'm currently working on a stored procedure, but having an error which seems odd. I'm following the synatx COPY tablename TO 'filename' .but i'm trying to use a variable as the filename. 1 : CREATE OR REPLACE FUNCTION archive() RETURNS void AS 2 : $BODY$DECLARE 3 :

Re: [GENERAL] 8.2.5 - 8.3 beta tsearch2 help

2007-10-16 Thread Andy
[EMAIL PROTECTED] wrote: i tried to restore a dump from 8.2.5 in which i had used tsearch2 and contains lot of tsearch2 index. when i tried to restore it to 8.3beta it complained about 'unknow command \r\n' . i know it is from tsearch2. doesnt 8.3 have tsearch2 enabled by default? with 8.2xx i

[GENERAL] Preserving view source code

2007-10-16 Thread Thomas Kellerer
Hello, when I create a view, e.g.: CREATE VIEW my_view AS SELECT col1, col2, col3 FROM mytable; And I later retrieve the view's source using SELECT definition FROM pg_view, the source I supplied has been altered by Postgres. The formatting has been removed completely and PG

Re: [GENERAL] problem with a column of type timestamp

2007-10-16 Thread brian
Sascha Bohnenkamp wrote: Hi, I have a table of type timestamp. I get the following error when I try to insert som edata to it: PGRES_FATAL_ERROR column birthtime is of type timestamp without time zone but expression is of type time without time zone You will need to rewrite or cast the

Re: [GENERAL] problem with a column of type timestamp

2007-10-16 Thread Michael Glaesemann
On Oct 16, 2007, at 1:55 , Sascha Bohnenkamp wrote: PGRES_FATAL_ERROR column birthtime is of type timestamp without time zone but expression is of type time without time zone You will need to rewrite or cast the expression. how can I set the timezone? The issue isn't the time zone: I

Re: [GENERAL] 8.3 beta problems

2007-10-16 Thread Tom Lane
Marek Lewczuk [EMAIL PROTECTED] writes: I'm testing 8.3beta and I think that there is a problem with gist/gin indexes. The performance of 8.3 is very bad comparing to 8.2. Comparing to 8.2.which-exactly? I'm wondering if you have an example that doesn't work well with the gist page-splitting

Re: [GENERAL] Preserving view source code

2007-10-16 Thread Richard Huxton
Thomas Kellerer wrote: Hello, when I create a view, e.g.: And I later retrieve the view's source using SELECT definition FROM pg_view, the source I supplied has been altered by Postgres. The formatting has been removed completely and PG actually re-wrote the query. For the above example I

[GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Stanislav Raskin
Hello everybody, I am currently running two PostgreSQL servers on two different machines. One of them I use for development and the other one as the real production server for my applications. While developing new versions of these applications, I of course have to modify the database

Re: [GENERAL] improvement proposition

2007-10-16 Thread hubert depesz lubaczewski
On Tue, Oct 16, 2007 at 11:16:46AM -0400, Tom Lane wrote: Turn on log_statement. I don't believe the feature you are asking for will be nearly as useful as you think. More than likely, what it will show you is something like commit; begin and you'll be little wiser than before. What you'll

[GENERAL] move databases files location

2007-10-16 Thread jehan.procaccia
hello, my postgresql installation from redhat package: $ rpm -q postgresql postgresql-7.4.17-1.RHEL4.1 is located in /var partition, unfortunalty it is nearly full $ df -H . Filesystem Size Used Avail Use% Mounted on /dev/sda12 11G 8.2G 1.7G 84% /var How can I

[GENERAL] How to view the SQL that Pg actually executes?

2007-10-16 Thread Kynn Jones
I understand that in some cases (e.g. when add_missing_from is true), Pg will modifiy some SQL input before running it. Is there a way to get Pg to print out the SQL it will actually execute? Is it possible to get to *just* print out this SQL without actually executing it? TIA! kj

Re: [GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Scott Marlowe
On 10/16/07, Stanislav Raskin [EMAIL PROTECTED] wrote: Hello everybody, I am currently running two PostgreSQL servers on two different machines. One of them I use for development and the other one as the real production server for my applications. While developing new versions of these

[GENERAL] SPI_exec() + PG_TRY/PG_CATCH

2007-10-16 Thread Aleksandrs Vinogradovs
Guys, So I haven't got my question answered, thus trying it again ;) How do I handle SPI errors properly without rethrowing them or using subtransactions ? My current code works (simple PG_CATCH() with resseting of error state), but reports reference leaks for every failed SPI_exec() call...

Re: [GENERAL] move databases files location

2007-10-16 Thread Richard Huxton
jehan.procaccia wrote: my postgresql installation from redhat package: $ rpm -q postgresql postgresql-7.4.17-1.RHEL4.1 is located in /var partition, unfortunalty it is nearly full $ df -H . Filesystem Size Used Avail Use% Mounted on /dev/sda12 11G 8.2G 1.7G 84%

Re: [GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Richard Huxton
Stanislav Raskin wrote: I figure there must be a better way to do so. Is there some kind of software, which compares two database schemas (preferably two sql dumps), and generates a script for applying differences to one of them? What would be the best practice for applying such updates

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Laurent Duperval
On Mon, 15 Oct 2007 15:06:37 -0400, Kris Jurka wrote: I get en error in the logs that state: Server process exited with exit code -1073741502 This is likely a server bug. If you can isolate the failing test and extract a self contained example someone can probably fix it. It seems to

Re: [GENERAL] Recommended method for creating file of zeros?

2007-10-16 Thread Jason L. Buberel
And thank you to Kevin - this did the trick perfectly. I've been able to recover everything successfully. Regards, Jason Kevin Hunter wrote: The tool is 'dd' and /dev. /dev/zero in this case. The summary of what you asked: $ dd if=/dev/zero of=./zblah count=1 bs=256k 1+0 records in 1+0

Re: [GENERAL] Preserving view source code

2007-10-16 Thread Thomas Kellerer
Richard Huxton wrote on 16.10.2007 18:59: The formatting has been removed completely and PG actually re-wrote the query. For the above example I would get: Is there a way to tell PG _not_ to alter my SQL, so I can retrieve the same (or at least a very similar) version of the original

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Laurent Duperval
I will add that speed may be a factor also. When I increase the amount of logging by the PG server, I see the problem less often. L On Mon, 15 Oct 2007 17:58:48 +, Laurent Duperval wrote: Hi, I have a large amount of tests I run in Eclipse to test my application. Many of them create

[GENERAL] How to set config param temporarily?

2007-10-16 Thread Kynn Jones
I'd like to set some config parameter temporarily; i.e. so that the new setting is active, say, only during the execution of the next SQL statement. This is the best I've come up with: -- first, save the original setting of the parameter CREATE TEMP TABLE save_config AS SELECT setting FROM

Re: [GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Michael Crozier
Stanislav Raskin wrote: I figure there must be a better way to do so. Is there some kind of software, which compares two database schemas (preferably two sql dumps), and generates a script for applying differences to one of them? What would be the best practice for applying such updates

Re: [GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Stanislav Raskin
Thank you very much for the advice. I'll start getting rid of the manual labour habit right away by writing the changes for the current update into a nice and tidy script :) -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Scott Marlowe

[GENERAL] Logging deadlocked statements?

2007-10-16 Thread Mason Hale
We're noticing a number of deadlock errors in our postgres logs. Along with the errors, there is a single statement logged to give context to the deadlock. Is is possible to log all the statements involved in the deadlock? We're having a hard time detecting these deadlocks when they happen, and

[GENERAL] need help with rebuilding postgresql

2007-10-16 Thread jooy
Hello all, We have a serious problem. Out dedicated server was hacked last Sunday. And technical support used a new hard drive with new-installed centOS to build our new server. Unfortunately, we don't have database backup(pg_dump). We only have the old drive mounted and access normal files. Is

Re: [GENERAL] How to set config param temporarily?

2007-10-16 Thread Alvaro Herrera
Kynn Jones escribió: I'd like to set some config parameter temporarily; i.e. so that the new setting is active, say, only during the execution of the next SQL statement. This is the best I've come up with: Did you try SET LOCAL? It works per transaction rather than per statement though. --

Re: [GENERAL] need help with rebuilding postgresql

2007-10-16 Thread Richard Huxton
jooy wrote: Hello all, We have a serious problem. Out dedicated server was hacked last Sunday. And technical support used a new hard drive with new-installed centOS to build our new server. Unfortunately, we don't have database backup(pg_dump). We only have the old drive mounted and access

[GENERAL] insert continue on error

2007-10-16 Thread Tom Hart
Hello everybody. I'm trying to migrate our data mine from a MS Access backend to a postgresql backend, and I'm bumping into problems with the conversion. I've got the basic db and tables set up. I want to transfer data from one table to another with insert into ... select from. The from

Re: [GENERAL] How to set config param temporarily?

2007-10-16 Thread Guy Rouillier
Kynn Jones wrote: Is there a less laborious approach? The root of needing to go through all this song and dance is that I don't know of any way to set up a simple temporary variable to hold a value. The temporary table is the closest I can come up to implementing a temporary variable. Is

Re: [GENERAL] improvement proposition

2007-10-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/16/07 08:21, hubert depesz lubaczewski wrote: hi, would it be possible for someone to add last query for pg_stat_activity view? there is a lot of cases that we have idle in transaction sitting for long time, and since we dont log all

Re: [GENERAL] SPI_exec() + PG_TRY/PG_CATCH

2007-10-16 Thread Tom Lane
Aleksandrs Vinogradovs [EMAIL PROTECTED] writes: How do I handle SPI errors properly without rethrowing them or using subtransactions ? Those are your only two choices. My current code works (simple PG_CATCH() with resseting of error state), but reports reference leaks for every failed

Re: [GENERAL] need help with rebuilding postgresql

2007-10-16 Thread jooy
Thanks so much. We now have CentOS and postgresql ready. But we are missing the backup files, that's, we haven't done pg_dump our database. How to restore the database from some files like using mdb file to restore a Access database? Is it possible in Postgres? I am new to Postgres. Your help will

Re: [GENERAL] Preserving view source code

2007-10-16 Thread Raymond O'Donnell
On 16/10/2007 18:16, Thomas Kellerer wrote: I'm maintaining a cross-platform SQL tool that also displays source code for views, triggers etc. It would have been nice if the tool could actually display the source the same way it looked when the user ran the CREATE VIEW statement (which is

Re: [GENERAL] insert continue on error

2007-10-16 Thread Raymond O'Donnell
On 16/10/2007 20:37, Tom Hart wrote: What I'd like to know is if there's a way to have postgresql still insert the other rows, and either bounce the bad row to another table, or log the error in another table/file. I'm sure there's a way to do this, but I'm still pretty new to postgresql.

Re: [GENERAL] need help with rebuilding postgresql

2007-10-16 Thread Scott Marlowe
On 10/16/07, jooy [EMAIL PROTECTED] wrote: On 10/16/07, Richard Huxton [EMAIL PROTECTED] wrote: jooy wrote: Hello all, We have a serious problem. Out dedicated server was hacked last Sunday. And technical support used a new hard drive with new-installed centOS to build our new

Re: [GENERAL] improvement proposition

2007-10-16 Thread Chris Browne
[EMAIL PROTECTED] (Ron Johnson) writes: On 10/16/07 08:21, hubert depesz lubaczewski wrote: hi, would it be possible for someone to add last query for pg_stat_activity view? there is a lot of cases that we have idle in transaction sitting for long time, and since we dont log all queries it

Re: [GENERAL] need help with rebuilding postgresql

2007-10-16 Thread jooy
Thanks for the input. Let me put it in this way:We are running a php site over postgresql database server. The name of database instance is FOIM. All of a sudden after Sunday, some guy hacked the system. We need rebuild the system. Now we have new-installed OS along with Postgres 7. Unfortunately,

Re: [GENERAL] need help with rebuilding postgresql

2007-10-16 Thread Scott Marlowe
On 10/16/07, jooy [EMAIL PROTECTED] wrote: Thanks for the input. Let me put it in this way:We are running a php site over postgresql database server. The name of database instance is FOIM. All of a sudden after Sunday, some guy hacked the system. We need rebuild the system. Now we have

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Alvaro Herrera
Laurent Duperval wrote: On Mon, 15 Oct 2007 15:06:37 -0400, Kris Jurka wrote: I get en error in the logs that state: Server process exited with exit code -1073741502 This is likely a server bug. If you can isolate the failing test and extract a self contained example someone can

[GENERAL] Index Usage

2007-10-16 Thread Bryan Murphy
Is there a way I can track index usage over a long period of time? Specifically, I'd like to identify indexes that aren't being regularly used and drop them. Bryan ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Index Usage

2007-10-16 Thread Ben
You could take a look at pg_statio_user_indexes and/or pg_stat_user_indexes, if you have stats enabled On Tue, 16 Oct 2007, Bryan Murphy wrote: Is there a way I can track index usage over a long period of time? Specifically, I'd like to identify indexes that aren't being regularly used

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Maybe Eclipse is trying to run more of them at a time than ant, and the extra concurrency is killing the server for some reason. Was this compiled with Cygwin, or is it the native (mingw) version? Don't both those builds have some hard-wired upper

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Trevor Talbot
On 10/16/07, Alvaro Herrera [EMAIL PROTECTED] wrote: Laurent Duperval wrote: I get en error in the logs that state: Server process exited with exit code -1073741502 FYI, this exit code means a DLL's initialization routine indicated failure during process startup. If I run each test

Re: [GENERAL] pg_dump - schema diff compatibility

2007-10-16 Thread Tomi N/A
2007/10/16, Sualeh Fatehi [EMAIL PROTECTED]: SchemaCrawler for PostgreSQL will allow you to do the diffs. With SchemaCrawler for PostgreSQL, you can take human-readable snapshots of the schema and data, for later comparison. SchemaCrawler outputs details of your schema (tables, views,

Re: [GENERAL] Inconsistence in transaction isolation docs

2007-10-16 Thread Trevor Talbot
On 10/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: well, I know how read committed behaves, but I don't see why should anyone expect an update of the resultset of the currently executing query after a commit by a different transaction. A currently executing UPDATE will see changes made to

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Laurent Duperval
Hi, Sorry for top-posting but since I am answering questions that don't all appear in this message: - I installed the default download of Postgres. I didn't compile myself, so it's probably the mingw version - Max_connections is set to 500. I did that originally because I kept seeing a message

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-16 Thread Magnus Hagander
Hi, Sorry for top-posting but since I am answering questions that don't all appear in this message: - I installed the default download of Postgres. I didn't compile myself, so it's probably the mingw version It is. - Max_connections is set to 500. I did that originally because I kept