Giter Club home page Giter Club logo

Comments (3)

mfussenegger avatar mfussenegger commented on June 27, 2024

Is something like this supported in PostgreSQL?

A user can be granted more than one role which means there would need to be some rules in regards to which mapping takes precedence.

Potential workaround:

  • Create one user for fdw
  • Create views with that user that re-expose the foreign tables
  • Give other users privileges on the views

from crate.

proddata avatar proddata commented on June 27, 2024

Is something like this supported in PostgreSQL?

No, PostgreSQL allows the following:

CREATE USER MAPPING [ IF NOT EXISTS ] FOR { user_name | USER | CURRENT_ROLE | CURRENT_USER | PUBLIC }

where USER | CURRENT_ROLE | CURRENT_USER are equal to the current user, while PUBLIC specifies a user mapping to be used when there is no user-specific mapping is applicable.

  • This also is followed by e.g. DB2 and Greenplum.
  • SQL Server is using Linked Servers and also either allows NULL (which is equivalent to PUBLIC) or a specific user.

I would tend to allow CREATE USER MAPPING FOR PUBLIC and control access to foreign tables via user privileges and/or use a VIEW as described above -> #16166

from crate.

mfussenegger avatar mfussenegger commented on June 27, 2024

Closing in favour of #16166

from crate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.