Re: Hide function source - Mailing list pgsql-admin

From Mladen Gogala
Subject Re: Hide function source
Date
Msg-id 77700cbc-99da-c231-1234-b207494b49a9@gmail.com
Whole thread Raw
In response to Hide function source  (Nelson Gonzaga <ngonzaga@yahoo.com>)
List pgsql-admin


On 10/10/21 04:50, Nelson Gonzaga wrote:
Dear,
How do I hide a function source code from all users except superuser, but all can execute it?
Thanks,
Nelson

That is not possible. Postgres doesn't store functions in the compiled form, it stores them in the source form. Each process that executes a function has to compile it first. If you are looking for something like the Oracle "wrap", it might exist as an extension, I don't know. Please be aware that even Oracle "wrap" is not very secure. There is a public SQL*Developer extension which unwraps the wrapped source code.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

pgsql-admin by date:

Previous
From: Pepe TD Vo
Date:
Subject: Re: Hide function source
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Hide function source