Обсуждение: problem with grant all privileges
I tried:
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO testuser;
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.ERROR: syntax error at or near "ALL"
LINE 1: GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO te...
Susan
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
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
This is 9.2
On Mon, Jan 27, 2014 at 4:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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
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
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. +
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
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. +
On 01/28/2014 10:33 AM, Bruce Momjian wrote:
You probably want to first clear things with your accountant. And your doctor!On Mon, Jan 27, 2014 at 07:48:33PM -0500, Tom Lane wrote:Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:This is 9.2I'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 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
Thanks, guys.
Susan
On Mon, Jan 27, 2014 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> 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.
regards, tom lane