Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

functioncmds.c

  • Tom Lane's avatar
    aa111062
    Adjust permissions checking for ALTER OWNER commands: instead of · aa111062
    Tom Lane authored
    requiring superuserness always, allow an owner to reassign ownership
    to any role he is a member of, if that role would have the right to
    create a similar object.  These three requirements essentially state
    that the would-be alterer has enough privilege to DROP the existing
    object and then re-CREATE it as the new role; so we might as well
    let him do it in one step.  The ALTER TABLESPACE case is a bit
    squirrely, but the whole concept of non-superuser tablespace owners
    is pretty dubious anyway.  Stephen Frost, code review by Tom Lane.
    aa111062
    History
    Adjust permissions checking for ALTER OWNER commands: instead of
    Tom Lane authored
    requiring superuserness always, allow an owner to reassign ownership
    to any role he is a member of, if that role would have the right to
    create a similar object.  These three requirements essentially state
    that the would-be alterer has enough privilege to DROP the existing
    object and then re-CREATE it as the new role; so we might as well
    let him do it in one step.  The ALTER TABLESPACE case is a bit
    squirrely, but the whole concept of non-superuser tablespace owners
    is pretty dubious anyway.  Stephen Frost, code review by Tom Lane.