Re: Simple commands don't work

From: Ziggy Skalski <zskalski(at)afilias(dot)info>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Simple commands don't work
Date: 2014-06-16 23:52:36
Message-ID: 539F8344.5030106@afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2014-06-16, 1:45 PM, Larry Martell wrote:
> Hello-
>
> I am new to Postgres, but I am very experienced with Sybase, Oracle,
> and MySQL. I am trying to use some simple commands, but they do not
> seem to work.
>
> First I wanted to give myself a password. I read in the online docs
> the command was this:
>
> phis=> alter user larry set password = 'XXXX';
> ERROR: unrecognized configuration parameter "password"
>
> Then I read somewhere else it is:
>
> phis=> ALTER USER larry WITH PASSWORD 'XXXX';
> ALTER ROLE
>
> But then it still let me log in without one.
>
> Then I checked with pgAdmin and it showed I did not have any password.
> I set one there, but it still lets me login without one.
>
> Then I went to do a select from a table, and I got permission denied.
> But the table is in a schema (the name is "public") that is set for
> "GRANT ALL TO ALL"
>
> According to the docs this would be the command to grant access to all tables:
>
> phis=> grant select on all tables in public to larry;
> ERROR: syntax error at or near "public"
>
> But it doesn't like that. The I found this:
>
> phis=> grant ALL PRIVILEGES ON DATABASE phis to larry;
> WARNING: no privileges were granted for "phis"
>
> From pgAdmin I was able to grant myself select access, but why don't
> the command line commands work?
>
>
> Thanks!
> -larry
>
>

Hi there,
ALTER USER larry password 'newpass';
That should work

Ziggy

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2014-06-17 07:23:13 Re: Simple commands don't work
Previous Message Larry Martell 2014-06-16 21:11:10 Re: Simple commands don't work