Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
| Array.prototype.destroy = function(obj){ | |
| // Return null if no objects were found and removed | |
| var destroyed = null; | |
| for(var i = 0; i < this.length; i++){ | |
| // Use while-loop to find adjacent equal objects | |
| while(this[i] === obj){ | |
| // Remove this[i] and store it within destroyed |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |