Re: [GENERAL] question about frequency of updates/reads

2009-06-24 Thread Craig Ringer
Andrew Smith wrote: - C++ app reads data from proprietary system and writes it into temp table in PostgreSQL - ASP.NET web service reads data from temp table in PostgreSQL and generates HTML [snip] This temp table will probably contain up to 1 records, each of which could be changing

Re: [GENERAL] possible bug on age() function (8.2.4 , 8.3.6)

2009-06-24 Thread Philippe Amelant
Ok but if I work with hours or whatever the problem is still there SELECT (EXTRACT(EPOCH FROM TIMESTAMP '2009-06-23 18:36:05.064066+02') - EXTRACT(EPOCH FROM TIMESTAMP '2009-05-12 18:36:05.064066+02'))/3600, EXTRACT(EPOCH FROM interval '1008 hours')/3600, age('2009-06-23 18:36:05.064066+02'

Re: [GENERAL] Replication

2009-06-24 Thread Dimitri Fontaine
Hi, Gerry Reno gr...@verizon.net writes: You can also get support for Londiste (which is used in production by Skype... I think that speaks for itself). Londiste is beta. The fact that Skype uses it is because it's part of Skytools which is their product. They may want to run their own

Re: [GENERAL] Separating raise notice lines

2009-06-24 Thread Alban Hertroys
On Jun 23, 2009, at 10:27 PM, Radcon Entec wrote: raise notice 'User name is % %', userRecord.name, chr(10); I am trying to insert a carriage return character (chr(10)) in the user name notice so that any subsequent notices will appear on separate lines. However, when I use a query to

Re: [GENERAL] [BUGS] Integrity check

2009-06-24 Thread Albe Laurenz
David Fetter wrote: Please can you assist on following questions. This is an issue for pgsql-general, where I'm redirecting this. * do you any tool to check postgreSQL database integrity check? No more than Oracle does. We get it right in the first place. The existence of integrity

Re: [GENERAL] help with data recovery from injected UPDATE

2009-06-24 Thread Gus Gutoski
Success, of sorts. I was able to retrieve 90% the corrupted data by dumping the heap file. Many thanks to those who replied with helpful suggestions. If you're interested in detail then read on. Otherwise, don't bother. The data was still in the table -- I could see it using a hex editor.

[GENERAL] A question about inheritance and sequence

2009-06-24 Thread Marko Pahić
Hello, I have two databases, and I want the same structure, and if I change the structure of one database it changes the structure of the other. In documentation I saw that the syntax goes something like this: CREATE TABLE User () INHERITS database2.User; But it's not working like this, and I

Re: [GENERAL] Inserting Values into Interval

2009-06-24 Thread Jasen Betts
On 2009-06-23, BlackMage dsd7...@uncw.edu wrote: Well what format should be used then? The application works like this. Users use a watch time how fast they run from point A to point B. Afterwards they enter the time taken, say 5 minutes 39 seconds, into a field. The field already checks to

[GENERAL] Postgres 8.3.7 -- EOF on client connection

2009-06-24 Thread CM J
Hi , I installed postgres 8.3.7-1 in my windows machine. The server starts all right.However when i attempt a JDBC connection(Driver used: postgresql-8.3-604.jdbc4.jar), the following error is thrown: 2009-06-24 17:55:03.564 ISTERROR: relation befailover does not exist 2009-06-24

Re: [GENERAL] possible bug on age() function (8.2.4 , 8.3.6)

2009-06-24 Thread Jasen Betts
On 2009-06-24, Philippe Amelant pamel...@companeo.com wrote: Ok but if I work with hours or whatever the problem is still there SELECT (EXTRACT(EPOCH FROM TIMESTAMP '2009-06-23 18:36:05.064066+02') - EXTRACT(EPOCH FROM TIMESTAMP '2009-05-12 18:36:05.064066+02'))/3600, EXTRACT(EPOCH FROM

Re: [GENERAL] possible bug on age() function (8.2.4 , 8.3.6)

2009-06-24 Thread Philippe Amelant
Le mercredi 24 juin 2009 à 12:45 +, Jasen Betts a écrit : On 2009-06-24, Philippe Amelant pamel...@companeo.com wrote: Ok but if I work with hours or whatever the problem is still there SELECT (EXTRACT(EPOCH FROM TIMESTAMP '2009-06-23 18:36:05.064066+02') - EXTRACT(EPOCH FROM

[GENERAL] JDBC prepared statements server-side prepared statements

2009-06-24 Thread Jack Orenstein
I'm using postgresql 8.3.7. Under what conditions does a JDBC prepared statement result in a server-side prepared statement? Jack Orenstein -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Bug in ecpg lib ?

2009-06-24 Thread leif
Hi guys, I'm using PostgreSQL in a server project that uses many forks and many threads in each forked process. Almost everytime I do a pthread_cancel() I get a SIGSEGV. I have then linked the libmudflapth into my program to catch the problem sooner and now that reports either

Re: [GENERAL] A question about inheritance and sequence

2009-06-24 Thread Filip Rembiałkowski
W dniu 24 czerwca 2009 13:43 użytkownik Marko Pahić mpa...@gmail.comnapisał: Hello, I have two databases, and I want the same structure, and if I change the structure of one database it changes the structure of the other. In documentation I saw that the syntax goes something like this: CREATE

Re: [GENERAL] A question about inheritance and sequence

2009-06-24 Thread Joshua Tolley
On Wed, Jun 24, 2009 at 01:43:20PM +0200, Marko Pahić wrote: Hello, I have two databases, and I want the same structure, and if I change the structure of one database it changes the structure of the other. In documentation I saw that the syntax goes something like this: CREATE

[GENERAL] just curious

2009-06-24 Thread Filip Rembiałkowski
http://wiki.postgresql.org/wiki/Identity_Guidelines say: In Japan a turtle logo is used in place of the elephant. Why? -- Filip Rembiałkowski JID,mailto:filip.rembialkow...@gmail.com http://filip.rembialkowski.net/

Re: [GENERAL] just curious

2009-06-24 Thread Dave Page
2009/6/24 Filip Rembiałkowski filip.rembialkow...@gmail.com: http://wiki.postgresql.org/wiki/Identity_Guidelines say: In Japan a turtle logo is used in place of the elephant. Why? I've been told it's because the elephant was a symbol of the Japanese cult Aum Shinrikyo whose members were

[GENERAL] Return LEFT JOINed tables when one has no matching column

2009-06-24 Thread Madison Kelly
Hi all, I've got a variation on a question I asked some time ago... I've got a table that is simply a collection of variable - value columns with a pointer to another table. I use this as little as possible, given how much of a headache it is, but I've run into a situation where I need to

Re: [GENERAL] Replication

2009-06-24 Thread Thomas Kellerer
Craig Ringer wrote on 24.06.2009 04:07: Thomas Kellerer wrote: Mike Christensen wrote on 23.06.2009 19:37: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) I think this is what Oracle promises with their RAC technology. Isn't RAC a

[GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Eduardo Morras
Hello: I'm currently building a Pg multiserver and have a question about the possibility of working with WAL in a multislave environment. I have few master servers (write only) and multiple slave servers (read only). I want to write the WAL files from masters in a central postgres and

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Alvaro Herrera
Eduardo Morras wrote: Hi, I'm currently building a Pg multiserver and have a question about the possibility of working with WAL in a multislave environment. I have few master servers (write only) and multiple slave servers (read only). I want to write the WAL files from masters in a

Re: [GENERAL] PgDay Athens 2009: Call for Presentations

2009-06-24 Thread Joshua D. Drake
On Tue, 2009-06-23 at 23:16 -0400, Michael Alan Brewer wrote: To submit your presentation proposal, please go to: http://postgresqlconference.org/2009/pgday/athens The Call for Presentations will close on August 1st. Thanks, and I hope to see y'all in Athens! Note you must have an

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Eduardo Morras
At 19:05 24/06/2009, Alvaro Herrera wrote: Eduardo Morras wrote: Hi, I'm currently building a Pg multiserver and have a question about the possibility of working with WAL in a multislave environment. I have few master servers (write only) and multiple slave servers (read only). I want to

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Scott Marlowe
On Wed, Jun 24, 2009 at 11:22 AM, Eduardo Morrasemor...@s21sec.com wrote: Yes, there will be 3 masters recolleting data (doing updates, inserts and deletes) for now and 5 slaves where we will do the searches. The slaves must have all the data recollected by the 3 masters and the system must be

[GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Dragan Sahpaski
Hello List, I tried installing postgreSql 8.4 RC1 on ubuntu 9.04 - jaunty, with the postgres 8.4 RC1one click installer provided by EnterpriseDB as it says in the download page on the postgres site. The instalation goes fine and the DB looks fine, but after the first reboot, the current

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Eduardo Morras
At 19:25 24/06/2009, you wrote: On Wed, Jun 24, 2009 at 11:22 AM, Eduardo Morrasemor...@s21sec.com wrote: Yes, there will be 3 masters recolleting data (doing updates, inserts and deletes) for now and 5 slaves where we will do the searches. The slaves must have all the data recollected by

Re: [GENERAL] Return LEFT JOINed tables when one has no matching column

2009-06-24 Thread Harald Fuchs
In article 4a425379.90...@alteeve.com, Madison Kelly li...@alteeve.com writes: SELECT a.tbl1_name, b.tbl2_date, c.tbl3_value AS some_value FROM table_1 a LEFT JOIN table_2 b ON (a.tbl1_id=b.tbl2_tbl1_id) LEFT JOIN table_3 c ON

Re: [GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Jorge Vidal - Disytel
I have compiled --manually-- Postgres 8.4 RC1 on KUbuntu 9.04 without any problem. Maybe the problem is with the libs that the installer uses... Regards Dragan Sahpaski escribió: Hello List, I tried installing postgreSql 8.4 RC1 on ubuntu 9.04 - jaunty, with the postgres 8.4 RC1one click

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Alvaro Herrera
Eduardo Morras escribió: At 19:25 24/06/2009, you wrote: On Wed, Jun 24, 2009 at 11:22 AM, Eduardo Morrasemor...@s21sec.com wrote: Yes, there will be 3 masters recolleting data (doing updates, inserts and deletes) for now and 5 slaves where we will do the searches. The slaves must have

Re: [GENERAL] Return LEFT JOINed tables when one has no matching column

2009-06-24 Thread Madison Kelly
Harald Fuchs wrote: In article 4a425379.90...@alteeve.com, Madison Kelly li...@alteeve.com writes: SELECT a.tbl1_name, b.tbl2_date, c.tbl3_value AS some_value FROM table_1 a LEFT JOIN table_2 b ON (a.tbl1_id=b.tbl2_tbl1_id) LEFT JOIN table_3 c ON

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Scott Marlowe
On Wed, Jun 24, 2009 at 11:51 AM, Alvaro Herreraalvhe...@commandprompt.com wrote: Eduardo Morras escribió: At 19:25 24/06/2009, you wrote: On Wed, Jun 24, 2009 at 11:22 AM, Eduardo Morrasemor...@s21sec.com wrote: Yes, there will be 3 masters recolleting data (doing updates, inserts and

[GENERAL] fast shutdown

2009-06-24 Thread Mary Sipple
When a fast shutdown is done (pg_ctl stop -s -D$PGDATA -mf) active transactions are aborted. Are these transactions logged somewhere re-run when postmaster comes back up? Thanks, Mary

Re: [GENERAL] just curious

2009-06-24 Thread Emanuel Calvo Franco
I've been told it's because the elephant was a symbol of the Japanese cult Aum Shinrikyo whose members were behind the sarin gas attacks on the Tokyo subway. The history behind the logos! :o The turtle was the original logo at Berkeley I believe.

Re: [GENERAL] fast shutdown

2009-06-24 Thread Scott Marlowe
On Wed, Jun 24, 2009 at 12:25 PM, Mary Sipplemsip...@iii.com wrote: When a fast shutdown is done (pg_ctl stop -s -D$PGDATA -mf) active transactions are aborted. Are these transactions logged somewhere re-run when postmaster comes back up? No -- Sent via pgsql-general mailing list

Re: [GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Dave Page
On Wed, Jun 24, 2009 at 6:49 PM, Jorge Vidal - Disyteljor...@disytel.com wrote: I have compiled --manually-- Postgres 8.4 RC1 on KUbuntu 9.04 without any problem.  Maybe the problem is with the libs that the installer uses... It is. There's a libuuid.so somewhere it shouldn't be. If you move

Re: [GENERAL] Replication

2009-06-24 Thread Mike Christensen
We need to stop this thread, you guys are making me want to ditch Postgres and get Oracle (after taking out a second mortgage on my house that is).. Mike On Wed, Jun 24, 2009 at 9:40 AM, Thomas Kellerer spam_ea...@gmx.net wrote: Craig Ringer wrote on 24.06.2009 04:07: Thomas Kellerer wrote:

[GENERAL] Serious JDBC problem

2009-06-24 Thread Bayless Kirtley
For some reason, the PostgreSQL JDBC driver fails to properly recognize daylight saving time. When retrieving the current time as a java.sql.Time, if returns an hour behind when DST is in effect. Here is a tested sample Java code that demonstrates the error.. private void

Re: [GENERAL] Replication

2009-06-24 Thread Joshua D. Drake
On Wed, 2009-06-24 at 12:13 -0700, Mike Christensen wrote: We need to stop this thread, you guys are making me want to ditch Postgres and get Oracle (after taking out a second mortgage on my house that is).. You must have a really big house... I could send all of my kids to college (4), easily

Re: [GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Dave Page
On Wed, Jun 24, 2009 at 8:09 PM, Dave Pagedp...@pgadmin.org wrote: I get a fix sorted out. It seems my colleagues in India are one step ahead of us all :-) http://git.postgresql.org/gitweb?p=edb-installers.git;a=commit;h=de100d9f27628a69d5f94529ce1ad0cb10f183f9 -- Dave Page EnterpriseDB UK:

Re: [GENERAL] A question about inheritance and sequence

2009-06-24 Thread Marko Pahić
Triggers are generally more robust. Quick example: NEW.noteid := SELECT 1+ COALESCE( (SELECT noteid FROM Notes WHERE userkey=NEW.userkey ORDER BY noteid DESC LIMIT 1), 0 ); Can you please write me the whole trigger? I've been reading the manual for an hour and I have no idea in where to apply

Re: [GENERAL] Replication

2009-06-24 Thread Geoffrey
Mike Christensen wrote: We need to stop this thread, you guys are making me want to ditch Postgres and get Oracle (after taking out a second mortgage on my house that is).. You must have a REALLY nice house with a LOT of equity... Mike On Wed, Jun 24, 2009 at 9:40 AM, Thomas Kellerer

Re: [GENERAL] Replication

2009-06-24 Thread Scott Marlowe
Not me. I've fed and watered PostgreSQL for the better part of a decade and did so for Oracle for three years. At no point did I want to switch preference from pgsql ro Oracle. There were some things Oracle did I wanted to see in pgsql, but the overall package of pgsql is way better in my

[GENERAL] example of aggregate function for product

2009-06-24 Thread Whit Armstrong
I needed to write a product aggregate function, and just happened to find this example in the nodes to the 8.0 manual: Ansis ansis_no_ AT inbox.lv13 Jan 2006 16:41:05 An aggregate multiplication function, an analog of sum (the same should be defined also for other numeric types): CREATE OR

Re: [GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Dragan Sahpaski
Dave Page wrote: On Wed, Jun 24, 2009 at 6:49 PM, Jorge Vidal - Disyteljor...@disytel.com wrote: I have compiled --manually-- Postgres 8.4 RC1 on KUbuntu 9.04 without any problem. Maybe the problem is with the libs that the installer uses... It is. There's a libuuid.so somewhere it

Re: [GENERAL] 8.4 RC1 on ubuntu 9.04 jaunty, problems after install

2009-06-24 Thread Dragan Sahpaski
Dragan Sahpaski wrote: Dave Page wrote: On Wed, Jun 24, 2009 at 6:49 PM, Jorge Vidal - Disyteljor...@disytel.com wrote: I have compiled --manually-- Postgres 8.4 RC1 on KUbuntu 9.04 without any problem. Maybe the problem is with the libs that the installer uses... It is. There's a

Re: [GENERAL] Replication

2009-06-24 Thread Greg Smith
On Tue, 23 Jun 2009, Ray Stell wrote: What is the entry point for source and config documentation of the standby patch? http://wiki.postgresql.org/wiki/Hot_Standby -- * Greg Smith gsm...@gregsmith.com http://www.gregsmith.com Baltimore, MD -- Sent via pgsql-general mailing list

Re: [GENERAL] [BUGS] Integrity check

2009-06-24 Thread Scott Mead
2009/6/23 David Fetter da...@fetter.org On Tue, Jun 23, 2009 at 03:38:35PM +0800, Prasad, Venkat wrote: Hello, Please can you assist on following questions. This is an issue for pgsql-general, where I'm redirecting this. * do you any tool to check postgreSQL database integrity check?

Re: [GENERAL] example of aggregate function for product

2009-06-24 Thread Alvaro Herrera
Whit Armstrong escribió: Ansis ansis_no_ AT inbox.lv13 Jan 2006 16:41:05 An aggregate multiplication function, an analog of sum (the same should be defined also for other numeric types): CREATE OR REPLACE FUNCTION mul2(FLOAT,FLOAT) RETURNS FLOAT AS ' DECLARE a ALIAS FOR $1; b ALIAS FOR

Re: [GENERAL] Serious JDBC problem

2009-06-24 Thread Tom Lane
Bayless Kirtley bk...@cox.net writes: For some reason, the PostgreSQL JDBC driver fails to properly recognize daylight saving time. When retrieving the current time as a java.sql.Time, if returns an hour behind when DST is in effect. You'd be best advised to ask about that on the pgsql-jdbc

Re: [GENERAL] How can I interpolate psql variables in function bodies? - workaround

2009-06-24 Thread J. Greg Davidson
I've found a workaround using the new pg 8.3 feature of default values for function arguments. It is not a completely general workaround (it won't, e.g. allow type or table names to be interpolated) but it does what I need and perhaps others may find this trick useful. To briefly recap the

Re: [GENERAL] How can I interpolate psql variables in function bodies?

2009-06-24 Thread J. Greg Davidson
On Tue, 2009-06-16 at 09:20 +0200, Albe Laurenz wrote: I came up with the following: psql -v foo=10 test= \set funcbody `echo 'SELECT\ `:foo`echo '` test= create function foo() returns integer as :funcbody language sql; But that is ugly as hell and depends on the underlying operating