Thread

  1. Permissons on database

    Boulat Khakimov <boulat@inet-interactif.com> — 2001-03-06T17:00:47Z

    Hi,
    
    How do I grant permissions on everything in the selected databes? 
    
    GRANT doesnt take as on object database name nor does it accept wild
    chars....
    
    -- 
    Nothing Like the Sun
    
    
  2. Re: [SQL] Permissons on database

    Richard Huxton <dev@archonet.com> — 2001-03-06T17:26:12Z

    On 3/6/01, 5:00:47 PM, Boulat Khakimov <boulat@inet-interactif.com> wrote 
    regarding [SQL] Permissons on database:
    
    > Hi,
    
    > How do I grant permissions on everything in the selected databes?
    
    > GRANT doesnt take as on object database name nor does it accept wild
    > chars....
    
    By hand at the moment I'm afraid. There is no GRANT ALL ON ALL...
    
    Having said that, if you have plpgsql enabled on that database you could 
    write a simple loop to do so for you. If you'd find one useful let me 
    know and I'll knock one up.
    
     - Richard Huxton
    
    
  3. Re: [SQL] Permissons on database

    Roland Roberts <roland@astrofoto.org> — 2001-03-07T20:40:44Z

    >>>>> "bk" == Boulat Khakimov <boulat@inet-interactif.com> writes:
    
        bk> How do I grant permissions on everything in the selected
        bk> databes?
    
        bk> GRANT doesnt take as on object database name nor does it
        bk> accept wild chars....
    
    Attached is some Perl code I wrote long ago to do this.  This
    particular code was done for Keystone, a problem tracking database and
    it would do a "GRANT ALL".  Modify it as needed.  Last I checked it
    worked with both PostgreSQL 6.5.x and 7.0.x
    
    
  4. Re: [SQL] Permissons on database

    Rob Arnold <rob@cabrion.com> — 2001-03-13T02:20:27Z

    Are you looking for "grant all to public" or "grant select to public"?
    
    
    ----- Original Message -----
    From: "Roland Roberts" <roland@astrofoto.org>
    To: <pgsql-sql@postgresql.org>; <pgsql-general@postgresql.org>;
    <pgsql-novice@postgresql.org>
    Sent: Wednesday, March 07, 2001 3:40 PM
    Subject: Re: [SQL] Permissons on database
    
    
    > >>>>> "bk" == Boulat Khakimov <boulat@inet-interactif.com> writes:
    >
    >     bk> How do I grant permissions on everything in the selected
    >     bk> databes?
    >
    >     bk> GRANT doesnt take as on object database name nor does it
    >     bk> accept wild chars....
    >
    > Attached is some Perl code I wrote long ago to do this.  This
    > particular code was done for Keystone, a problem tracking database and
    > it would do a "GRANT ALL".  Modify it as needed.  Last I checked it
    > worked with both PostgreSQL 6.5.x and 7.0.x
    >
    >
    
    
    ----------------------------------------------------------------------------
    ----
    
    
    >
    > roland
    > --
    >        PGP Key ID: 66 BC 3B CD
    > Roland B. Roberts, PhD                             RL Enterprises
    > roland@rlenter.com                     76-15 113th Street, Apt 3B
    > rbroberts@acm.org                          Forest Hills, NY 11375
    >
    
    
    
  5. Re: [GENERAL] Re: Permissons on database

    Louis-David Mitterrand <vindex@apartia.ch> — 2001-04-08T09:10:06Z

    On Wed, Mar 07, 2001 at 03:40:44PM -0500, Roland Roberts wrote:
    > >>>>> "bk" == Boulat Khakimov <boulat@inet-interactif.com> writes:
    >
    >     bk> How do I grant permissions on everything in the selected
    >     bk> databes?
    >
    >     bk> GRANT doesnt take as on object database name nor does it
    >     bk> accept wild chars....
    >
    > Attached is some Perl code I wrote long ago to do this.  This
    > particular code was done for Keystone, a problem tracking database and
    > it would do a "GRANT ALL".  Modify it as needed.  Last I checked it
    > worked with both PostgreSQL 6.5.x and 7.0.x
    
    A simple two-line shell script to apply any command to a list of tables:
    
    for i in `psql mydatabase -c '\dt' -P tuples_only | cut -f2 -d ' '`
    do psql mydatabase -c "grant all on $i to public"; done
    
    
    >
    > ---------------------------(end of broadcast)---------------------------
    > TIP 6: Have you searched our list archives?
    >
    > http://www.postgresql.org/search.mpl
    
    These mailing list footers really suck. Please consider removing them.
    They reflect poorly on the general level of the pgsql-* lists. Instead
    do send a one-time "welcome" message containing all your "tips" when
    people subscribe to a list.
    
    Probably a lost cause but the subject mangling [GENERAL], [HACKERS] etc.
    (especially that one! a "hacker" should know how to filter his mail)
    really sucks too. 
    
    Educate, don't stoop. Even Outlook Express has great filtering
    capabilities which don't require any subject mangling.
    
    --
    slashdot: I miss my free time, Rob.