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

Feb
9
comment Reject Specific Database PostgreSQL User Authentication
So A and B are OS users? What do you mean by 'configuring that file creates tons of security issues'? Are you sure that the .pgpass files are owned by the respective owners (how does this solve your issue anyway? -W will override a wrong stored PW) and the permissions are 0600, at most?
Feb
9
comment search pgadmin for column
It would possibly easier for you to figure this out from the source you have - some sort of mapping must be there.
Feb
9
comment What's the difference between group roles and login roles?
It must be some design issue/bug - I was wondering myself. Such issues are the reasons why I am exclusively using psql and normal SQL statements for everything.
Feb
8
comment How to create unique index for both cases
You should ask database questions in a database language :) Why would you create two tables for the same sort of data? Or you mean rows there? Finally, does your requirement mean that if there is a message (or whatever you store there) from A to B, B cannot answer to A?
Feb
8
comment Why can I drop table when logged in as not owner?
Please show the output from \dt+ droppable_table and \du non_postgres_user, issued from psql.
Feb
8
comment Why default db privilleges are not applied on a new schema?
Please connect to your DB using psql and show the output of \ddp, as well as \dp problematic_table
Feb
6
comment pgAdmin is extremely slow on any remote operation
Does it always hang?
Feb
6
comment How to verify disk hit by a query
How do you distinguish between the blocks read from disk or from the OS cache?
Feb
5
comment Index has no gain vs normal query
Please post the EXPLAIN (ANALYZE, BUFFERS) output, both without the index and with it. EXPLAIN only shows the planner estimates, which might be very different from reality.
Feb
4
comment Schema Design for multiple many-to-one relationships. of which exactly one should exist
Why nullable columns and multiple FKs are a problem? And how many B-like tables you expect to have in the long run?
Feb
4
comment Advice for ETL from Oracle to SQL Server?
Could you please clarify your second sentence?
Feb
4
comment PostgreSQL not using index during count(*)
Interestingly, on a much narrower table (but with 1M rows per source_id) I see the index being used. Please add the details @ErwinBrandstetter asked for.
Feb
4
comment How to estimate reindexing time?
How much data do you load in that nightly process? BTW, these wide tables are sometimes divided into two, where the 'main' table has all the frequently needed stuff, with all the rest in the other part. If you care to share the table definition, all doubters could be sure if your design is the right one, BTW. Oh, and do you see autovacuum/autoanalyze working hard while your queries are slow?
Feb
4
comment How do I set the isolation level for SELECT statement?
@GoloRoden not necessarily - if some other transaction commits before the second SELECT starts, the two may see different data. In this case, you might need REPEATABLE READ.
Feb
4
comment Creating index using dynamic SQL
Please check what the format() function does and use it. Gives a much cleaner feeling.
Feb
4
comment Execute system commands in postgresql
Please note that this can also only be run with superuser rights (or using SECURITY DEFINER).
Feb
3
comment How to estimate reindexing time?
You can possibly try one index - check its size, REINDEX with measuring the time needed. Then calculate the total size of your indexes and do some math.
Feb
3
comment Fatal error when not numeric value - PostgreSQL 9.2
I am wondering if this query can produce that error. You mention an UPDATE in your first sentence - where is it?
Feb
3
comment Trigger for removing group with no users left in
What you say is also an option, in some cases it might be even better. Care to post it as an answer? Re: the mutating table problem you can prevent from happening by tracking trigger depth, in newer versions. What's more, the table to be changed is different from the one the trigger is defined on.
Feb
3
comment Stored procedure vs transaction anomaly
What is the autocommit setting (I guess you connect to the DB using JDBC)?