Re: [GENERAL] coalesce seems to give strange results

2010-07-14 Thread Richard Yen
Ah, I see what you mean. If there's no rows to return, then there's no coalesce-ing to do... sorry for the spam. --Richard On Jul 14, 2010, at 5:12 PM, Thom Brown wrote: > On 15 July 2010 00:52, Richard Yen wrote: >> Hi everyone, >> >> Looks like I&

[GENERAL] coalesce seems to give strange results

2010-07-14 Thread Richard Yen
Hi everyone, Looks like I'm encountering some quirks with coalesce()... > postgres=# select coalesce(null,0); > coalesce > -- > 0 > (1 row) > > postgres=# SELECT COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0) > FROM pg_stat_activity WHERE current_query = ' in transac

[GENERAL] CHECK constraint fails when it's not supposed to

2009-08-04 Thread Richard Yen
Hi All, I encountered an odd issue regarding check constraints complaining when they're not really violated. For this particular machine, I am running 8.3.7, but on a machine running 8.3.5, it seems to have succeeded. I also upgraded a third machine from 8.3.5 to 8.3.7, and the query succeeded (

Re: [GENERAL] trying to make sense of deadlocks

2009-02-09 Thread Richard Yen
在 Feb 9, 2009 8:52 PM 時, Tom Lane 寫到: Richard Yen writes: It seems like all the deadlocks are for tuple (3,60), but strangely, tuple (3,60) on the account table doesn't exist. Perhaps it was deleted? According to the account table, the account with id = 39271 (which the UPDATE state

[GENERAL] trying to make sense of deadlocks

2009-02-09 Thread Richard Yen
Hi, I'm trying to make sense of a situation I ran into this morning. Apparently, there were numerous deadlocks (approx. 75 in a 30-min period) while procs were trying to write to a table (16634, "account") in my database. Just to give you a sense of what's going on, process 22583 tried t

[GENERAL] creating a dumpfile from a view

2006-10-30 Thread Richard Yen
Hi, I'm trying to create a dumpfile for a client. The data is gathered from about 7 tables, and I need to output all the columns as the client wishes. I figure the best way to this is to collect data from multiple tables and putting them into a view, and using the client's desired names to

[GENERAL] SIGSEGV happens over once a day

2006-05-11 Thread Richard Yen
Hi all, I'm experiencing signal 11 (segmentation fault) failures on the master node of a 3-node Slony-I cluster. In the past week, we've averaged a little more than one segfault per day (11 times in the past 10, including today). Any ideas what's going on? Would anyone know how to track