6,040 reputation
31331
bio website
location Berlin, Germany
age 38
visits member for 2 years, 2 months
seen 3 hours ago

3h
comment Is there a psql equivalent of bash's reverse-search-history?
Have you tried Ctrl-r already? :)
Apr
14
comment PostgreSQL DB size increasing after restoring the same database backup
Also, you must not crosspost. If you feel you question fits better here, you have to ask for migration, not opening a new question. Furthermore, the size increased from where to where?
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
11
comment Fastest way to Restore 50TB DB
Could you please offer some context? Why do you have both SQL Server and PostgreSQL listed?
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 WORKING WITH PL/SQL FUNCTIONS
@edvinas.me I'm afraid this is not even a question...
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.