problem with grant all privileges

Started by Susan Cassidyabout 12 years ago10 messagesgeneral
Jump to latest
#1Susan Cassidy
susan.cassidy@decisionsciencescorp.com

I tried:

GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO testuser;
and I get:
ERROR: syntax error at or near "ALL"
LINE 1: GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO te...

also the same thing for tables, with the same results.

Am I misinterpreting the syntax for this?

Susan

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Susan Cassidy (#1)
Re: problem with grant all privileges

On 01/27/2014 01:45 PM, Susan Cassidy wrote:

I tried:

GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO testuser;
and I get:
ERROR: syntax error at or near "ALL"
LINE 1: GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO te...

also the same thing for tables, with the same results.

Am I misinterpreting the syntax for this?

Depends on what version of Postgres you are working with. The syntax of
commands changes with time.

So what Postgres version are you using?

Susan

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Adrian Klaver (#2)
Re: problem with grant all privileges

Adrian Klaver <adrian.klaver@gmail.com> writes:

On 01/27/2014 01:45 PM, Susan Cassidy wrote:

I tried:
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO testuser;
and I get:
ERROR: syntax error at or near "ALL"
Am I misinterpreting the syntax for this?

Depends on what version of Postgres you are working with. The syntax of
commands changes with time.

That syntax works for me back to 9.0, but 8.4 gives the described error;
which is unsurprising when you examine the respective documentation.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Susan Cassidy
susan.cassidy@decisionsciencescorp.com
In reply to: Tom Lane (#3)
Re: problem with grant all privileges

This is 9.2

On Mon, Jan 27, 2014 at 4:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

Adrian Klaver <adrian.klaver@gmail.com> writes:

On 01/27/2014 01:45 PM, Susan Cassidy wrote:

I tried:
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO testuser;
and I get:
ERROR: syntax error at or near "ALL"
Am I misinterpreting the syntax for this?

Depends on what version of Postgres you are working with. The syntax of
commands changes with time.

That syntax works for me back to 9.0, but 8.4 gives the described error;
which is unsurprising when you examine the respective documentation.

regards, tom lane

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Susan Cassidy (#4)
Re: problem with grant all privileges

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#5)
Re: problem with grant all privileges

On Mon, Jan 27, 2014 at 07:48:33PM -0500, Tom Lane wrote:

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

You know, if we could systematize this "dinner bet" thing, we could eat
very well at conferences. :-)

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#6)
Re: problem with grant all privileges

Bruce Momjian escribi�:

On Mon, Jan 27, 2014 at 07:48:33PM -0500, Tom Lane wrote:

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

You know, if we could systematize this "dinner bet" thing, we could eat
very well at conferences. :-)

It doesn't work very well if all that happens is some PG hacker pays
some other hacker's dinner. If users are willing to pay for hacker's
dinners, that'd be better, but I have seen few such offers.

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#8Rob Sargent
robjsargent@gmail.com
In reply to: Bruce Momjian (#6)
Re: problem with grant all privileges

On 01/28/2014 10:33 AM, Bruce Momjian wrote:

On Mon, Jan 27, 2014 at 07:48:33PM -0500, Tom Lane wrote:

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

You know, if we could systematize this "dinner bet" thing, we could eat
very well at conferences. :-)

You probably want to first clear things with your accountant. And your
doctor!

#9Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#7)
Re: problem with grant all privileges

On Tue, Jan 28, 2014 at 02:40:47PM -0300, Alvaro Herrera wrote:

Bruce Momjian escribi�:

On Mon, Jan 27, 2014 at 07:48:33PM -0500, Tom Lane wrote:

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

You know, if we could systematize this "dinner bet" thing, we could eat
very well at conferences. :-)

It doesn't work very well if all that happens is some PG hacker pays
some other hacker's dinner. If users are willing to pay for hacker's
dinners, that'd be better, but I have seen few such offers.

Agreed. We would need a way to make sure the bet-users show up for
conferences so we can collect. lol

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#10Susan Cassidy
susan.cassidy@decisionsciencescorp.com
In reply to: Tom Lane (#5)
Re: problem with grant all privileges

It turns out IT screwed something up when they installed 9.2. The actual
server/client running is still pointing to 8.4.

Thanks, guys.

Susan

On Mon, Jan 27, 2014 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:

This is 9.2

I'd bet a very good dinner that it isn't --- maybe your psql is,
but your server has to be pre-9.0. Try "select version();" to
see the actual version of the server you're connected to.

regards, tom lane