Access to table only through functions

From: Alvin D?az <alvin(dot)rd(at)live(dot)com>
To: "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Access to table only through functions
Date: 2018-05-06 22:51:09
Message-ID: MWHPR17MB1392E52A397D68771E70D20BE7840@MWHPR17MB1392.namprd17.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am working in a software but I am using and approach in which business logic is in the database this way programmers only have to worry about what functions they have to call to perform some action or wich view query to get certain data but for this work perfectly I need to prevent developers to realize direct CRUD operations against the tables so is there a way that I could just allow a db user have permission to execute functions but not to perform actions on tables

Example:

1- table_user(id int, name text)
2- function_save_user(id int, name int).......

You can insert using the function but not writing direct insert statement.

Sent from my iPhone

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gerardo Herzig 2018-05-07 01:14:25 Re: Access to table only through functions
Previous Message Martin Stöcker 2018-04-30 11:22:31 Re: psql method (initcap and also keep Roman number capitalized)