6,639 reputation
31436
bio website
location Berlin, Germany
age 38
visits member for 2 years, 7 months
seen 22 hours ago

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?
Apr
1
comment Select Into Regexp_replace doesn't write changes into newly generated table
In other words, your regexp_replace() removes quotes from the start of a line, so at least one of the example data, query and output does not match the others.
Mar
28
comment Select Into Regexp_replace doesn't write changes into newly generated table
SELECT regexp_replace($$6''$$, $$^'*$$, '' , 'g'); returns 6''. Could you please post a set of consistent examples? Also, remove the double quotes if they are not part of the real data.
Mar
28
comment Add 0 into array_agg if there is no matching data
@user36209 could you show that query please?
Mar
27
comment Add 0 into array_agg if there is no matching data
@user36209 What does it return then?
Mar
26
comment Altering db schema in production environment
@Alexandros you could have waited a bit more... The question is still less than a day old, no need to hurry.