Postgresql results

postgresql

I have question about PostgreSQL. I would like to return different results for select all based on the client IP and I want it on the database level. In other words, I want to change query string. Should I change the PostgreSQL code and compile it based on my idea?

Best Answer

In PostgreSQL 9.5 and newer you could use row-level security to do this. I don't think it's a great idea, but that's the way to approach it if you're going to attempt it.