Thread

  1. BUG #18998: No materialized views in INFORMATION_SCHEMA.TABLE_PRIVILEGES

    PG Bug reporting form <noreply@postgresql.org> — 2025-07-24T17:50:36Z

    The following bug has been logged on the website:
    
    Bug reference:      18998
    Logged by:          Žiga Kranjec
    Email address:      lacanoid@ljudmila.org
    PostgreSQL version: 17.0
    Operating system:   Any
    Description:        
    
    View NFORMATION_SCHEMA.TABLE_PRIVILEGES contains information for views and
    tables, but not materialized views. I found this to be somewhat unexpected.
    
    Since materialized views are conceptually somewhere between views and
    tables, it would perhaps make sense to include them.
    
    The standard of course doesn’t say anything about this because it does not
    deal with materialized views at all.
    
    
  2. Re: BUG #18998: No materialized views in INFORMATION_SCHEMA.TABLE_PRIVILEGES

    Tom Lane <tgl@sss.pgh.pa.us> — 2025-07-24T21:18:50Z

    PG Bug reporting form <noreply@postgresql.org> writes:
    > View NFORMATION_SCHEMA.TABLE_PRIVILEGES contains information for views and
    > tables, but not materialized views. I found this to be somewhat unexpected.
    > Since materialized views are conceptually somewhere between views and
    > tables, it would perhaps make sense to include them.
    > The standard of course doesn’t say anything about this because it does not
    > deal with materialized views at all.
    
    Yeah, precisely.  Our take on the information schema is that it should
    show what the standard says, and thus objects that are outside the
    standard should not appear there at all.  Obviously that's a bit of
    a judgment call, but it saves us from having to make a bunch of other
    judgment calls about just how much we'd want to warp the information
    schema's behavior.
    
    For example, in the case at hand it'd be darn weird for matviews
    to be reflected in TABLE_PRIVILEGES but not TABLES, so then we'd
    have to allow a nonstandard value of TABLES.TABLE_TYPE, and then we're
    already some way down the slippery slope to something that claims to
    be the information schema but contains much that a standards-compliant
    client wouldn't know what to do with.
    
    			regards, tom lane