[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Newbie question
From:       Andrew Foster <afoster () educationalmeasures ! com>
Date:       2018-03-20 16:57:30
Message-ID: ee6ccdda-b2d4-cad4-8209-be388d8efa4d () educationalmeasures ! com
[Download RAW message or body]

Hi Ron,

If you GRANT CREATE and USAGE on schema FOO for the developer's user, 
your developer should be able to create new objects (in this case, 
functions) in schema FOO.

My suggestion for a best approach would be to consider what your default 
privileges should be 
(https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html) 
as well as setting up groups so that you don't have to modify 
permissions for each individual.


Hope this helps!

Andrew Foster | Educational Measures, LLC
Sr. Database Administrator

On 3/20/18 10:50 AM, Ron Watkins wrote:
>
> I am pretty new to Postgresql.
>
> I have a database with a schema, ill call it ‘FOO’ here in the message.
>
> I also have a developer, who want’s to create a function for use in 
> the ‘FOO’ schema.
>
> Im not finding the appropriate command to allow that user to create a 
> function in the FOO schema (or elsewhere).
>
> Is there such a command? I was looking under the ‘GRANT’ but I don’t 
> see a way to grant “CREATE or REPLACE FUNCTION”.
>
> Am I missing anything here? What is the best approach?
>


[Attachment #3 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Ron,</p>
    <p>If you GRANT CREATE and USAGE on schema FOO for the developer's
      user, your developer should be able to create new objects (in this
      case, functions) in schema FOO.</p>
    <p>My suggestion for a best approach would be to consider what your
      default privileges should be
(<a class="moz-txt-link-freetext" \
href="https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html"> \
https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html</a>)  \
as well as setting up groups so that you don't have to modify  permissions for each \
individual.</p>  <p><br>
    </p>
    <p>Hope this helps!<br>
    </p>
    <pre class="moz-signature" cols="72">Andrew Foster | Educational Measures, LLC
Sr. Database Administrator
</pre>
    <div class="moz-cite-prefix">On 3/20/18 10:50 AM, Ron Watkins wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2a9a01d3c06b$8bb5d6a0$a32183e0$@gmail.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">I am pretty new to Postgresql.<o:p></o:p></p>
        <p class="MsoNormal">I have a database with a schema, ill call
          it ‘FOO’ here in the message.<o:p></o:p></p>
        <p class="MsoNormal">I also have a developer, who want’s to
          create a function for use in the ‘FOO’ schema.<o:p></o:p></p>
        <p class="MsoNormal">Im not finding the appropriate command to
          allow that user to create a function in the FOO schema (or
          elsewhere).<o:p></o:p></p>
        <p class="MsoNormal">Is there such a command? I was looking
          under the ‘GRANT’ but I don’t see a way to grant “CREATE or
          REPLACE FUNCTION”.<o:p></o:p></p>
        <p class="MsoNormal">Am I missing anything here? What is the
          best approach?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic