cockroachdb / cockroachdb/cockroach

sql: implement USAGE privileges on procedural languages

Open
#112,258 1 comment 0 reactions 0 assignees View on GitHub
A-sql-pgcompat A-sql-plpgsql A-sql-privileges C-enhancement T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Creating PLpgSQL functions and procedures should require `USAGE` privileges. From the [Postgres docs](https://www.postgresql.org/docs/8.1/sql-grant.html):

> USAGE
> For procedural languages, allows the use of the specified language for the creation of functions in that language. This is the only type of privilege that is applicable to procedural languages.

Jira issue: CRDB-32317

Epic CRDB-60816

Contributor guide

Open the contributing guide

Research direction

No implementation files or tests are named. Start by reading the PostgreSQL privilege documentation and locating CockroachDB's handling of procedural-language function and procedure creation; done means creation requires USAGE on the selected language.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.