Reputation
21,619
Next tag badge:
81/100 score
29/20 answers
Badges
1 20 51
Newest
 Nice Answer
Impact
~532k people reached

16h
comment Deleted data from pg_authid
Whoops. I hope you have backups from beforehand! To fix it, you'd have to start PostgreSQL up in single-user mode then create a new entry in pg_authid using CREATE USER.
21h
comment Can I make postgres more verbosely tell me what it's doing?
On newer versions, SET log_lock_waits = on and SET client_min_messages = 'log'
2d
awarded  Nice Answer
Aug
27
comment PostgreSQL trigger function that selects from %current% table
@ErwinBrandstetter Yeah. Just going to delete and forget I think. Shouldn't have resurrected.
Aug
27
comment How to return multiple columns (each a composite type) in plpythonu
No, I meant [((1,2),(3,4))]. You're right that I had a typo, I missed a closing paren. It should be a 1-element list, containing a 2-element tuple, each element of which is a 2-element tuple. If plpythonu supports representing composite types as tuples, that should work. I haven't tested.
Aug
27
comment Trigger function using current row and current table name as variables
This: "I guess I would like to store the table name itself as a variable" still makes no sense. That is what the pre-defined variable TG_TABLE_NAME is. Why store it in a variable when it already is a variable?
Aug
27
comment PostgreSQL trigger function that selects from %current% table
That's what I said, but that was apparently not what the user wants according to the confusing comments left on the answer (now vanished, huh).
Aug
27
comment Postgres Dump and Restore on Linux Terminal
Don't gzip it if you use -Fc. It's compressed internally. You would have to unzip it to pg_restore it if you gzip'd it.
Aug
27
comment How to return multiple columns (each a composite type) in plpythonu
What about return [((1,2),(3,4)] ( a one-element list, containing a tuple with inner tuples) ?
Aug
27
revised How to return multiple columns (each a composite type) in plpythonu
edited title
Aug
27
answered Looks like a postgres backup/dump structure (A sort of a forensic/data archeology question)
Aug
26
answered Postgres Dump and Restore on Linux Terminal
Aug
26
revised PostgreSQL trigger function that selects from %current% table
added 221 characters in body
Aug
26
answered PostgreSQL trigger function that selects from %current% table
Aug
26
revised PostgreSQL trigger function that selects from %current% table
edited tags
Aug
25
awarded  Enlightened
Aug
25
awarded  Nice Answer
Aug
25
answered Grouping in long tables
Aug
25
comment Grouping in long tables
cdrs_primary looks really wide, with all those varchar columns. Possibly quite denormalized too. Have you looked into creating a star schema for this, for OLAP work?
Aug
25
revised PostgreSQL procedural languages overhead (plpython / plsql / pllua…)
added 174 characters in body