While implementing a method to retrieve the permissions on a table,
the statement: "grant all on test to public;" kills the backend.

-- 
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Thu, 8 Jan 1998 21:57:44 +0000 (GMT)
Peter T Mount <psqlhack@maidast.demon.co.uk>
grant broken
> 
> While implementing a method to retrieve the permissions on a table,
> the statement: "grant all on test to public;" kills the backend.

Works here.

-- 
Bruce Momjian
maillist@candle.pha.pa.us

Thu, 8 Jan 1998 20:48:00 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] grant broken
On Thu, 8 Jan 1998, Bruce Momjian wrote:

> > 
> > While implementing a method to retrieve the permissions on a table,
> > the statement: "grant all on test to public;" kills the backend.
> 
> Works here.

I've just resynced with cvs, rebuilt from scratch and still:

test=> \z

Database    = test
 +------------------+----------------------------------------------------+
 |  Relation        |             Grant/Revoke Permissions               |
 +------------------+----------------------------------------------------+
 | test             |                                                    | 
 +------------------+----------------------------------------------------+
test=> grant all on test to pmount;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.

This happens both with and without the large object patch, so that's ruled
out.

Platform: Linux 2.0.27

-- 
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Fri, 9 Jan 1998 15:32:22 +0000 (GMT)
Peter T Mount <psqlhack@maidast.demon.co.uk>
Re: [HACKERS] grant broken
How about a new initdb?

> 
> On Thu, 8 Jan 1998, Bruce Momjian wrote:
> 
> > > 
> > > While implementing a method to retrieve the permissions on a table,
> > > the statement: "grant all on test to public;" kills the backend.
> > 
> > Works here.
> 
> I've just resynced with cvs, rebuilt from scratch and still:
> 
> test=> \z
> 
> Database    = test
>  +------------------+----------------------------------------------------+
>  |  Relation        |             Grant/Revoke Permissions               |
>  +------------------+----------------------------------------------------+
>  | test             |                                                    | 
>  +------------------+----------------------------------------------------+
> test=> grant all on test to pmount;
> PQexec() -- Request was sent to backend, but backend closed the channel
> before responding.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> 
> This happens both with and without the large object patch, so that's ruled
> out.
> 
> Platform: Linux 2.0.27
> 
> -- 
> Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
> Main Homepage: http://www.demon.co.uk/finder
> Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
> 
> 


-- 
Bruce Momjian
maillist@candle.pha.pa.us

Fri, 9 Jan 1998 11:31:11 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] grant broken
On Fri, 9 Jan 1998, Bruce Momjian wrote:

> How about a new initdb?

That was the first thing I tried. When that didn't work, I removed the
entire distribution, resynced the source with cvs, and recompiled.

When checking that the large object fix wasn't to blame, I did a fresh
initdb again before testing.


-- 
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Fri, 9 Jan 1998 17:09:34 +0000 (GMT)
Peter T Mount <psqlhack@maidast.demon.co.uk>
Re: [HACKERS] grant broken
> 
> On Fri, 9 Jan 1998, Bruce Momjian wrote:
> 
> > How about a new initdb?
> 
> That was the first thing I tried. When that didn't work, I removed the
> entire distribution, resynced the source with cvs, and recompiled.
> 
> When checking that the large object fix wasn't to blame, I did a fresh
> initdb again before testing.

Can you give me a test case?  Is it \z on an empty database, or does a
table have to have a specific permissoin?

---------------------------------------------------------------------------

test=> \z

Database    = test
 +------------------+----------------------------------------------------+
 |  Relation        |             Grant/Revoke Permissions               |
 +------------------+----------------------------------------------------+
 | test             | {"=arwR","wilson=arwR"}                            | 
 | test2            |                                                    | 
 | test3            |                                                    | 
 | test4            |                                                    | 

-- 
Bruce Momjian
maillist@candle.pha.pa.us

Fri, 9 Jan 1998 16:56:00 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] grant broken
On Fri, 9 Jan 1998, Bruce Momjian wrote:

> > 
> > On Fri, 9 Jan 1998, Bruce Momjian wrote:
> > 
> > > How about a new initdb?
> > 
> > That was the first thing I tried. When that didn't work, I removed the
> > entire distribution, resynced the source with cvs, and recompiled.
> > 
> > When checking that the large object fix wasn't to blame, I did a fresh
> > initdb again before testing.
> 
> Can you give me a test case?  Is it \z on an empty database, or does a
> table have to have a specific permissoin?

It's a test database, with a single table in it, and two users (the DBA,
and a normal user).

One of the methods in JDBC's DatabaseMetaData returns details about the
rights granted on the database, so to test the method, I was setting up
the normal user with update rights to the table, so I had something to
work on.

The backend simply dies when ever the grant statement is entered
correctly.

-- 
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Sat, 10 Jan 1998 12:08:41 +0000 (GMT)
Peter T Mount <psqlhack@maidast.demon.co.uk>
Re: [HACKERS] grant broken
> > Can you give me a test case?  Is it \z on an empty database, or does a
> > table have to have a specific permissoin?
>
> It's a test database, with a single table in it, and two users (the DBA,
> and a normal user).
>
> One of the methods in JDBC's DatabaseMetaData returns details about the
> rights granted on the database, so to test the method, I was setting up
> the normal user with update rights to the table, so I had something to
> work on.
>
> The backend simply dies when ever the grant statement is entered
> correctly.

If I understood the test case you published, you are specifying to the grant
command the database "test", not a table within the database. The man page for
grant is not very specific, but is this supposed to work?

                                            - Tom


Sat, 10 Jan 1998 16:34:25 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] grant broken
On Sat, 10 Jan 1998, Thomas G. Lockhart wrote:

> If I understood the test case you published, you are specifying to the grant
> command the database "test", not a table within the database. The man page for
> grant is not very specific, but is this supposed to work?

No, there is a table called test, that I'm granting permissions to. The
database is also called test.

Could grant be confusing the two?

-- 
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


Sun, 11 Jan 1998 11:40:40 +0000 (GMT)
Peter T Mount <psqlhack@maidast.demon.co.uk>
Re: [HACKERS] grant broken