6,989 reputation
31439
bio website
location Berlin, Germany
age 38
visits member for 2 years, 10 months
seen 8 hours ago

Oct
24
comment Transactions within a Transaction
You could try it yourself: WARNING: there is already a transaction in progress It starts no new (sub)transaction, nested transactions are not implemented in PostgreSQL. (You may do some magic in a pl/pgsql function, for example, that mimics that behaviour, though.)
Oct
22
comment Optimizing query - understanding explain
... which may mean that the time is lost while transferring and/or rendering the output.
Oct
21
awarded  Nice Answer
Oct
8
comment psql: Show current database
From psql version 9.1. That should cover basically all the psql clients out there these days, though.
Oct
6
comment postgres: access to schema objects within a function
Which user calls this function? Also, what does \dn+ schema_A show you (when logged in with psql)?
Sep
30
awarded  Explainer
Sep
26
comment pgAgent does not run
What is the periodicity you've set? From the next run entry, one could guess it's one day, which is not passed yet since the creation of this job.
Sep
25
comment BitmapIndexScan vs IndexScan tuning
It is not quite clear which query these plans belong to. Could you please clarify?
Sep
22
comment Can we pass a varchar/text datatype in to a variable in pgbench?
Try simply \set v_username 'user_' :cnt. This is no SQL operation, so the || operator does not work.
Sep
16
comment Backing entire Postgres database server up with pg_basebackup
Is there a specific reason of using pg_basebackup instead of pg_dumpall?
Sep
15
comment Loop update 1000 rows at a time
What sort of error(s) do you get?
Sep
15
comment Loop update 1000 rows at a time
Hm. How do you see that the entire table is locked?
Sep
15
comment Loop update 1000 rows at a time
You diligently collect the IDs to update, then do nothing with it. This way you update all rows in the the table that have a counterpart in bet_settle_txs. You should join the txs 'table' in the FROM clause (or add an IN (SELECT id FROM txs) to the WHERE clause).
Sep
12
revised get row count of last select query
added 12 characters in body
Sep
12
comment get row count of last select query
Please note that psql is a client to PostgreSQL (or Postgres for short).
Sep
12
comment sum of double precision gives weird results
postgresql.org/docs/9.3/static/… also starts with a warning to this effect, basically.
Sep
12
comment Run and Save multiple SELECT statements
Also worth noting that from within a function (if it is really needed in this case) one cannot split the output to separate files (well, no file handling at all, unless one goes pl/python or something). A function has only one result set, regardless how many statements produce the output.
Sep
12
comment Suppression of statement in Postgresql logging
You have an option to log your stuff in CSV format. In that case, these two appear in one row (the format is more verbose, though).
Sep
11
comment Permission denied when importing a database
Apparently, you don't have access to the file with the DB dump. Can you open it in an editor?
Sep
11
comment Use cases for hstore vs json datatypes in postgresql
@ckarbass Thanks for the input. If you check the question history, the version that triggered my comment was very different from the present one.