pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rural Hunter <ruralhunter@gmail.com>
To: Szymon Guz <mabewlun@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Why sequence grant is separated from table?
Date: Wed, 19 Jun 2013 18:06:11 +0800
Message-ID: <51C18293.4030904@gmail.com> (raw)
In-Reply-To: <CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com>
References: <51C17B74.4070109@gmail.com>
	<CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">于 2013/6/19 17:47, Szymon Guz 写道:<br>
    </div>
    <blockquote
cite="mid:CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com"
      type="cite">
      <div dir="ltr">On 19 June 2013 11:35, Rural Hunter <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:ruralhunter@gmail.com" target="_blank">ruralhunter@gmail.com</a>&gt;</span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">I really
              hate the error "permission denied for sequence xxxxx" when
              I grant on a table but forget to grant additionally on the
              related sequence to users. Can the permission of table and
              related sequences be merged?<span class="HOEnZb"><font
                  color="#888888"><br>
                  <br>
                </font></span></blockquote>
            <div><br>
            </div>
            <div style="">I can imagine a situation where you want a
              user to be granted rights on a table, to use sequence with
              curval and nextval functions, but not setval, as it can
              provide some database problems.</div>
          </div>
        </div>
      </div>
    </blockquote>
    oh, is it possible to separately grant nextval and setval on
    sequence currently?<br>
    <blockquote
cite="mid:CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div style=""><br>
            </div>
            <div style="">What's more, in general, you cannot say which
              sequence is used for which table, if the sequence is not
              owned by the table.</div>
          </div>
        </div>
      </div>
    </blockquote>
    Can we get it from the column definition such as a serial column?<br>
    <blockquote
cite="mid:CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div style=""><br>
            </div>
            <div style="">Which permissions of a table do you want to
              merge with which permissions of sequences?</div>
          </div>
        </div>
      </div>
    </blockquote>
    At least granting insert on a table means to grant update on the
    sequence used by serial columns.<br>
    <blockquote
cite="mid:CAFjNrYto7C0G_2+UFLcWng3T6rZih5t54P0tRO4w+_Z0wONxMA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div style=""><br>
            </div>
            <div style="">regards</div>
            <div style="">Szymon</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>




view thread (7+ messages)  latest in thread

Message-ID: <51C18293.4030904@gmail.com>
Permalink:  ../51C18293.4030904@gmail.com/
Also on:    postgresql.org/message-id/51C18293.4030904@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ruralhunter@gmail.com, mabewlun@gmail.com
  Subject: Re: Why sequence grant is separated from table?
  In-Reply-To: <51C18293.4030904@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox