Reputation
2,079
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
5 18
Impact
~106k people reached

Jul
1
revised PostgreSQL doesn't log
deleted 22 characters in body
Jun
29
comment PostgreSQL doesn't log
@dezso: That is unlikely... did you test with sudo -u postgres echo hi > /tmp/test.txt? That runs echo as postgres but the redirect as root. The correct syntax is sudo -u postgres bash -c 'echo hi > /tmp/test.txt' and it should show a "permission denied" error.
Jun
29
revised PostgreSQL doesn't log
added 60 characters in body
Jun
29
answered PostgreSQL doesn't log
Jun
21
comment Is there a way to add a column to a table without affecting performance?
On a busy Postgres system adding a column might never get through. I've had to firewall out all clients to get the exclusive lock required. By contrast, SQL Server blocks new locks until the alter has gone through. Surprisingly different behavior!
Jun
8
answered Using the value of a JSON object that is stored in a PostgreSQL JSON array
Jun
8
revised Using the value of a JSON object that is stored in a PostgreSQL JSON array
added 6 characters in body
Jun
2
comment Drop primary key without dropping an index
You can promote an index to primary key with alter table NameOfTable add constraint NameOfPrimaryKeyConstraint primary key using NameOfExistingIndex, but I don't think the reverse is possible.
Jun
2
comment postgresql Insert into table B based on foreign key in table A, if exists in A else
A single statement can change at most one table. So it is impossible for one expression to insert rows into two tables.
May
28
comment How to safeguard a symmetric key in SQL Server
If you don't trust the DBA, don't ask the database to do encryption for you. Encrypt client side. (Note that the sysadmin of the client server can always access your data. You can't prevent that.)
May
28
comment Postgres Partition Table Trigger inserting duplicate records
Triggers are evil. Move the logic to another place. For example, create a procedure that the client can call instead of doing an insert.
May
28
comment Which columns (and order) to choose for a clustered index to maximize query performance
Why are you doing performance optimization at all? What's your goal?
May
27
revised Understanding & Resolving Deadlock in SQL Server 2008 R2
Formatting
May
27
answered Understanding & Resolving Deadlock in SQL Server 2008 R2
May
27
comment Performance hickups after Postgres 9.4 upgrade
@SoniHarriz: Worked for us, you can try it out, the change is effective without a reboot or restarting postgres. We noticed no negative side effects.
May
27
suggested approved edit on Understanding & Resolving Deadlock in SQL Server 2008 R2
May
21
comment Spiky COMMIT results in performance slowdowns with Postgres 8.4
That is quite possible, but there are a lot of variables in play
May
21
comment Code required to make column not nullable
Sure, alter is very safe, not sure why you'd doubt that
May
21
comment Code required to make column not nullable
Looks like SSMS is programmed to re-create tables to change a column's nullability Perhaps they have a list of safe operations, and altering the nullability of a non-PK was not on it?
May
21
comment Code required to make column not nullable
Can't imagine anything going wrong with alter table. Curious why SSMS thinks it has to alter all the other tables, when the referenced column is not changing!