6,690 reputation
31436
bio website
location Berlin, Germany
age 38
visits member for 2 years, 8 months
seen 15 hours ago

May
27
comment How do I decompose ctid into page and row numbers?
IIRC it is a vector type and we don't have accessor methods on these. I am not sure if you can do it from a C function. Craif will tell for sure :)
May
23
comment COPY TO .csv and add quotes to header in PostgreSQL
Why do you need such a thing? :) Otherwise, I am unaware of such a feature. You could add those quotes with sed, for example, after the file is created.
May
21
comment Restricting Insert and Update to functions
@user38729 then please mark the answer as accepted. Thanks!
May
20
comment How can I figure out what service is trying to connect as root?
In our case, using CSV format logging, the IP and port of origin can be seen from the log. On the other hand, when trying to connect with a nonexistent user, I get psql: FATAL: password authentication failed for user "elek", not the error you show. This may be of some help: stackoverflow.com/questions/16973018/…
May
20
comment Postgres live backup
Then why a hot standby and a plain failover are not an option?
May
20
comment Postgres live backup
I don't really get how do you plan to use the 'backup' database. What do you do with it when the primary fails? Regarding memory usage on the secondary, you can set shared_buffers to a rather low value (leave it at the default, for example) and then it won't use more.
May
15
comment Indexing a large static dataset
And (especially in the light of Craig's answer) what will you gain from an index on the timestamp column?
May
15
comment PostgreSQL Function: How to refer to individual column in record return by function
So, try to call SELECT * FROM circular_ref() instead of SELECT circular_ref().
May
13
comment Force drop db while others may be connected in postgresql
Let me suggest doing the first step like ALTER DATABASE mydb CONNECTION LIMIT 1. I would not touch the catalogs directly unless absolutely necessary.
May
9
comment How can I enable logging for a single function in PostgreSQL?
I could not make it working this way either. A possible workaround could be to get clock_timestamp() both on entry and exit and RAISE LOG with that information (or the difference or whatever).
May
8
comment Storing changes to stored procedure and triggers in PostgreSQL
postgresql.org/docs/9.3/static/event-trigger-definition.html I guess you can build your solution on this, you can write from the procedure defined from the trigger.
May
6
comment Postgresql create database with size & resize?
@CraigRinger how about putting the (default) tablespace on a restricted-size volume? This, at least, would remove the WAL from the equation.
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)