Reputation
12,552
Next tag badge:
733/1000 score
223/200 answers
Badges
7 32 59
Newest
 sql
Impact
~670k people reached

Mar
22
comment Moving slow sub-query to With clause
Please add the EXPLAIN (ANALYZE, BUFFERS) output of the slow query. Without it it is really like asking people to check their crystal balls. Mine is broken, for one.
Mar
21
comment Empty string values - PostgreSQL 9.2
Why, are you having hundreds of suspicious queries? To be clear, this problem of you can have uncountable sources, neither of those known to us.
Mar
21
comment Empty string values - PostgreSQL 9.2
Go to your code base, pick all queries that insert into this table or update its content, and then figure out which one is at fault.
Mar
19
comment How can I export just the structure of a MySQL database?
How is this different from the other similar answer?
Mar
19
comment How can I export just the structure of a MySQL database?
Is this a different version of PhpMyAdmin than the one in the accepted answer?
Mar
18
comment Does the PostgreSQL COPY command have the option of choosing with fields to map the CSV columns to?
@Patrick7 thanks, I've added this bit.
Mar
18
comment Moving extensions in AWS RDS (Postgres)
That sounds bad, yes.
Mar
17
comment How to view phppgadmin as the application name in PostgreSQL's log files?
Another idea is setting the PGAPPNAME environmental variable: postgresql.org/docs/9.1/static/…
Mar
17
comment How to view phppgadmin as the application name in PostgreSQL's log files?
I'd try to specify the application name in config.inc.php, in the relevant $conf['servers'] array. The parameter to libpq is application_name, try this one. You will have to reconnect to see if it works.
Mar
17
comment Postgresql 9.4 replication not working
How do you see replication is not working? It clearly tells 'started streaming WAL from primary'...
Mar
16
comment Moving extensions in AWS RDS (Postgres)
When logged in, check the ownership of the extension using SELECT extname, extowner::regrole FROM pg_catalog.pg_extension; (assuming you are on 9.5 - in any other case, you have to join pg_authid to get the role name). The rds_superuser is not really a superuser.
Mar
16
comment Postgresql string array vs join for user management schema?
Why do you want to save a join? Wait, you don't. Try to measure the performance difference of both approaches. Just add a bunch of fake users, and measure.
Mar
16
comment Postgresql string array vs join for user management schema?
The first. Only the first.
Mar
16
comment PostgreSQL Bloat Warning: Vaccuum does not help
Is it causing anything bad? If you have a working autovacuum setup, the table should not grow much.
Mar
15
comment Declare variable for SELECT statement in Postgres function
@liquid in my experience, moving from 8.4 to anything (up until 9.4, IIRC) is quite seamless.
Mar
11
comment N-dimensional vectors in PostgreSQL Spatial Index
No, this was clear. But an index makes sense only if it helps you run your queries faster. BTW, which version are you on?
Mar
11
comment N-dimensional vectors in PostgreSQL Spatial Index
'Whether the 'path' type ... will be suitable for my purposes' - but you did not describe those pruposes :)
Mar
11
comment Postgresql: how to remove a GRANT on multiple tables?
postgresql.org/docs/current/static/role-removal.html 'and any permissions granted to the role must be revoked'
Mar
10
comment Where to look for possible deadlock causes?
Any triggers on any of those tables?
Mar
10
comment How to select number of affected rows to variable in function?
Once you use PL/pgSQL, there is the ROW_COUNT variable: postgresql.org/docs/9.4/static/… Furthermore, with the default isolation level (READ COMMITTED), there are chances that you count one row and then update two (the second one being committed after the SELECT succeeds).