6,424 reputation
31436
bio website
location Berlin, Germany
age 38
visits member for 2 years, 5 months
seen 1 hour ago

May
5
comment MySQL Enums have non-intuitive behaviour, why?
Without explicitly telling what the problem is this question is not a good fit for the site, I guess. Could you please outline it in a few sentences? More detailed explanation could still be left for the article you linked.
Apr
28
comment PostgreSQL stored procedure to return rows or empty set
@ErwinBrandstetter I am always wondering how you keep finding these ancient questions :)
Apr
25
comment Get all partition names for a table
@Mavlarn thanks for pointing it out, after one year of staying here with that error :) Now fixed.
Apr
22
comment Is there a psql equivalent of bash's reverse-search-history?
@user664833 well, yes. Note that I am on Ubuntu.
Apr
18
comment Is there a psql equivalent of bash's reverse-search-history?
Have you tried Ctrl-r already? :)
Apr
11
comment Postgresql not working: error
If you remove postgres-xc, does your original installation work? Also, did you use some non-default directory layout?
Apr
11
comment Select query for returning different data based on creation time
@ypercube you are welcome :) Also, feel free to write up a nice solution using it, I don't have the time right now...
Apr
11
comment Select query for returning different data based on creation time
@ypercube I tried it now on a number table, it works (as all other aggregate functions, in theory - I mean I haven't tried all :D)
Apr
11
comment Select query for returning different data based on creation time
So what COALESCE is supposed to do there? Anyway, what you included is not a query, just a piece of it. Also, without example data it is hard to get what you are asking about. Still, I guess you want to do something like SELECT (SELECT {yesterday}), (SELECT {last_week}), (SELECT {last_month})
Apr
10
comment How do I determine if a column is defined as a serial data type instead of an integer based off the catalog?
Yes, it is like that.
Apr
10
comment How do I determine if a column is defined as a serial data type instead of an integer based off the catalog?
@Alex there is an other pseudotype called bigserial, I referred to that.
Apr
10
comment log_min_duration_statement setting is ignored
Let me add that the default for log_statement is none, so not setting it or setting to none has the same effect.
Apr
9
comment log_min_duration_statement setting is ignored
If you simply want to log all long-running statements (be it a SELECT, UPDATE or some DDL), then yes.
Apr
9
comment log_min_duration_statement setting is ignored
The thing is that you log the union of the two sets, not the intersection of it. I am not aware if it can be done as you'd like.
Apr
3
comment How do I list all databases and tables using psql?
Err, I was not very clear. It was intended instead of the logout-login cycle.
Apr
3
comment How do I list all databases and tables using psql?
Well, a simple set search_path=data, public; would do the trick, too :)
Apr
2
comment How to shift a value one record 'down'
Which RDBMS do you use? Also, what efforts you already made?
Apr
1
comment Select Into Regexp_replace doesn't write changes into newly generated table
@ErwinBrandstetter I always get confused by these multiplicated qutes so I always use dollar quoting in similar cases. I simply find it more readable.
Apr
1
comment Is it impossible to store 2^266 records on a database of some kind?
This question appears to be off-topic because unicorns.
Apr
1
comment Select Into Regexp_replace doesn't write changes into newly generated table
Why not use dollar-quotation?