Thread: role does not exist

role does not exist

From
"Kevin Burton"
Date:

I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type ‘psql’ and I get the error: ‘role “xxxx” does not exist’. Where xxx is the user name logged in. How do I overcome this hurdle. Right now all of our data is on a Windows SQL Server. Can someone give me step by step directions on how to import the databases from SQL Server. Actually I only want a few tables in the database. Hints?

 

Thank you.

 

Re: role does not exist

From
Adrian Klaver
Date:
On 10/31/2012 03:54 PM, Kevin Burton wrote:
> I have successfully installed PostgreSQL on a Ubuntu Linux machine.
> However right off the bat I type ‘psql’ and I get the error: ‘role
> “xxxx” does not exist’. Where xxx is the user name logged in. How do I
> overcome this hurdle. Right now all of our data is on a Windows SQL
> Server. Can someone give me step by step directions on how to import the
> databases from SQL Server. Actually I only want a few tables in the
> database. Hints?

http://www.postgresql.org/docs/9.2/interactive/app-psql.html

Usage

Connecting to a Database

"The default user name is your Unix user name, as is the default
database name.


To specify a user other than your system user name:

"
-U username
--username=username
Connect to the database as the user username instead of the default.
(You must have permission to do so, of course.)"

This assumes you have that user set up. Otherwise see:

http://www.postgresql.org/docs/9.2/interactive/app-createuser.html

>
> Thank you.
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Joshua D. Drake"
Date:
On 10/31/2012 03:54 PM, Kevin Burton wrote:
> I have successfully installed PostgreSQL on a Ubuntu Linux machine.
> However right off the bat I type ‘psql’ and I get the error: ‘role
> “xxxx” does not exist’. Where xxx is the user name logged in. How do I
> overcome this hurdle. Right now all of our data is on a Windows SQL
> Server. Can someone give me step by step directions on how to import the
> databases from SQL Server. Actually I only want a few tables in the
> database. Hints?

Well step by step is a bit exhaustive for a mailing list. To solve the
specific question the default user is postgres and the default super
user within postgresql is postgres. Try this:

sudo -u postgres psql

JD

>
> Thank you.
>


--
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC
@cmdpromptinc - 509-416-6579


Re: role does not exist

From
"Kevin Burton"
Date:
I tried this and I get an error that

'psql: FATAL: role "postgres" does not exist'

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Joshua D. Drake
Sent: Wednesday, October 31, 2012 6:33 PM
To: Kevin Burton
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist


On 10/31/2012 03:54 PM, Kevin Burton wrote:
> I have successfully installed PostgreSQL on a Ubuntu Linux machine.
> However right off the bat I type 'psql' and I get the error: 'role
> "xxxx" does not exist'. Where xxx is the user name logged in. How do I
> overcome this hurdle. Right now all of our data is on a Windows SQL
> Server. Can someone give me step by step directions on how to import
> the databases from SQL Server. Actually I only want a few tables in
> the database. Hints?

Well step by step is a bit exhaustive for a mailing list. To solve the
specific question the default user is postgres and the default super user
within postgresql is postgres. Try this:

sudo -u postgres psql

JD

>
> Thank you.
>


--
Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support,
Training, Professional Services and Development High Availability, Oracle
Conversion, Postgres-XC @cmdpromptinc - 509-416-6579


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



Re: role does not exist

From
Adrian Klaver
Date:
On 10/31/2012 06:01 PM, Kevin Burton wrote:
> I tried this and I get an error that
>
> 'psql: FATAL: role "postgres" does not exist'

What is the content of /etc/postgresql/pg_hba.conf?

>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
What am I looking for? It is full of comments. If I am looking at the lines
that don't begin with '#' I only see all and postgres as users.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Adrian Klaver
Sent: Wednesday, October 31, 2012 8:42 PM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 10/31/2012 06:01 PM, Kevin Burton wrote:
> I tried this and I get an error that
>
> 'psql: FATAL: role "postgres" does not exist'

What is the content of /etc/postgresql/pg_hba.conf?

>
>


--
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



Re: role does not exist

From
Craig Ringer
Date:
On 11/01/2012 06:54 AM, Kevin Burton wrote:

I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type ‘psql’ and I get the error: ‘role “xxxx” does not exist’.


As with most Ubuntu packages, there's documentation on post-install setup steps in /usr/share/doc/[packagename]/README.Debian.gz. See:

    zless /usr/share/doc/postgresql-?.?/README.Debian.gz

--
Craig Ringer

Re: role does not exist

From
"Kevin Burton"
Date:

Sorry there isn’t a README.Debian.gz in the postgresql-doc-9.1. There is a changelog.Debian.gz but that doesn’t seem to address this problem.

 

From: Craig Ringer [mailto:ringerc@ringerc.id.au]
Sent: Thursday, November 01, 2012 12:33 AM
To: Kevin Burton
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

 

On 11/01/2012 06:54 AM, Kevin Burton wrote:

I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type ‘psql’ and I get the error: ‘role “xxxx” does not exist’.


As with most Ubuntu packages, there's documentation on post-install setup steps in /usr/share/doc/[packagename]/README.Debian.gz. See:

    zless /usr/share/doc/postgresql-?.?/README.Debian.gz

--
Craig Ringer

Re: role does not exist

From
"Kevin Burton"
Date:
There is a tutorial directory but it has a README that I need to type 'make'
to view the files. Well, make wasn't available so I installed 'make' with
apt-get. Then I was met with an error apparently from the Makefile that
pg_conf: command not found. I seem to be getting farther and farther from
the original question, that of role "postgres" does not exist.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Adrian Klaver
Sent: Wednesday, October 31, 2012 8:42 PM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 10/31/2012 06:01 PM, Kevin Burton wrote:
> I tried this and I get an error that
>
> 'psql: FATAL: role "postgres" does not exist'

What is the content of /etc/postgresql/pg_hba.conf?

>
>


--
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



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 05:02 AM, Kevin Burton wrote:
> There is a tutorial directory but it has a README that I need to type 'make'
> to view the files. Well, make wasn't available so I installed 'make' with
> apt-get. Then I was met with an error apparently from the Makefile that
> pg_conf: command not found. I seem to be getting farther and farther from
> the original question, that of role "postgres" does not exist.
>

I just tested an install of Postgres on Ubuntu and sudo -u postgres psql
worked just fine.

Are you sure you installed all of the Postgres packages?
    What does dpkg -l| grep postgresql show?
Is Postgres is running?
    What does ps ax| grep postgresql show?



>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
Dpkg -l | grep postgresql shows
    postgresql-9.1
    postgresql-common
    postgresql-client-common
    postgresql-doc
    postgresql-doc-9.1
Ps -ax | grep postgresql shows
    Postgresql

I still get ' psql:  FATAL:  role "postgres" does not exist' when I execute
'sudo -u postgres psql'.


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Adrian Klaver
Sent: Thursday, November 01, 2012 8:24 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 05:02 AM, Kevin Burton wrote:
> There is a tutorial directory but it has a README that I need to type
'make'
> to view the files. Well, make wasn't available so I installed 'make'
> with apt-get. Then I was met with an error apparently from the
> Makefile that
> pg_conf: command not found. I seem to be getting farther and farther
> from the original question, that of role "postgres" does not exist.
>

I just tested an install of Postgres on Ubuntu and sudo -u postgres psql
worked just fine.

Are you sure you installed all of the Postgres packages?
    What does dpkg -l| grep postgresql show?
Is Postgres is running?
    What does ps ax| grep postgresql show?



>


--
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



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 06:38 AM, Kevin Burton wrote:
> Dpkg -l | grep postgresql shows
>      postgresql-9.1
>      postgresql-common
>      postgresql-client-common
>      postgresql-doc
>      postgresql-doc-9.1
> Ps -ax | grep postgresql shows
>      Postgresql

Please show the actual output from the ps command.


>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
I am having a hard time with the clipboard so I will reproduce the output as
best as I can:

2066 tty1 S+ 0:00 grep --color=auto postgresql


-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 8:42 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 06:38 AM, Kevin Burton wrote:
> Dpkg -l | grep postgresql shows
>      postgresql-9.1
>      postgresql-common
>      postgresql-client-common
>      postgresql-doc
>      postgresql-doc-9.1
> Ps -ax | grep postgresql shows
>      Postgresql

Please show the actual output from the ps command.


>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>
>


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Burton"
Date:
If you change the grep to postgres then there are a number of entries (about
17). The output since I don't have a clipboard is too much to try and type
in by hand.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Kevin Burton
Sent: Thursday, November 01, 2012 8:45 AM
To: 'Adrian Klaver'
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

I am having a hard time with the clipboard so I will reproduce the output as
best as I can:

2066 tty1 S+ 0:00 grep --color=auto postgresql


-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 8:42 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 06:38 AM, Kevin Burton wrote:
> Dpkg -l | grep postgresql shows
>      postgresql-9.1
>      postgresql-common
>      postgresql-client-common
>      postgresql-doc
>      postgresql-doc-9.1
> Ps -ax | grep postgresql shows
>      Postgresql

Please show the actual output from the ps command.


>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>
>


--
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



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 06:45 AM, Kevin Burton wrote:
> I am having a hard time with the clipboard so I will reproduce the output as
> best as I can:
>
> 2066 tty1 S+ 0:00 grep --color=auto postgresql

So  Postgres is not actually running. What you are seeing is the grep command.
If it where running you would see something like:

29041 ?  S    0:01 /usr/lib/postgresql/8.4/bin/postgres -D /var/lib/postgresql/8.4/main -c
config_file=/etc/postgresql/8.4/main/postgresql.conf


Try:

sudo /etc/init.d/postgresql-9.1 start

This should start Postgres.

Then do:

sudo -u postgres psql

>
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
> Sent: Thursday, November 01, 2012 8:42 AM
> To: Kevin Burton
> Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] role does not exist
>
> On 11/01/2012 06:38 AM, Kevin Burton wrote:
>> Dpkg -l | grep postgresql shows
>>       postgresql-9.1
>>       postgresql-common
>>       postgresql-client-common
>>       postgresql-doc
>>       postgresql-doc-9.1
>> Ps -ax | grep postgresql shows
>>       Postgresql
>
> Please show the actual output from the ps command.
>
>
>>
>> --
>> Adrian Klaver
>> adrian.klaver@gmail.com
>>
>>
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Grittner"
Date:
Adrian Klaver wrote:

> What does ps ax| grep postgresql show?

Are you sure you don't want this?:

  ps ax | grep postgres

-Kevin


Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 12:51 AM, Kevin Burton <rkevinburton@charter.net> wrote:
> If you change the grep to postgres then there are a number of entries (about
> 17). The output since I don't have a clipboard is too much to try and type
> in by hand.

Try this:

ps ax| grep postgresql >processes.txt

Then open processes.txt in an editor. You may be able to use the
clipboard more easily that way.

ChrisA


Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 12:56 AM, Chris Angelico <rosuav@gmail.com> wrote:
> On Fri, Nov 2, 2012 at 12:51 AM, Kevin Burton <rkevinburton@charter.net> wrote:
>> If you change the grep to postgres then there are a number of entries (about
>> 17). The output since I don't have a clipboard is too much to try and type
>> in by hand.
>
> Try this:
>
> ps ax| grep postgresql >processes.txt
>
> Then open processes.txt in an editor. You may be able to use the
> clipboard more easily that way.

And per the other posts, change postgresql to postgres for more useful
results. But you already knew that. :)

ChrisA


Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 06:51 AM, Kevin Burton wrote:
> If you change the grep to postgres then there are a number of entries (about
> 17). The output since I don't have a clipboard is too much to try and type
> in by hand.
>

If you are seeing the above in a terminal then use the mouse to select
the area and then right click and select copy.

>
>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
I do see actually three lines with a -D in it that may be similar:

1166 ? S 0:01 /usr/bin/postgres -C -D /var/lib/postgres-xc/coord
1214 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode1
1233 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode2

There are a number of entries of the form:

1185 ? Ss 0:10 postgres: pooler process

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 8:52 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 06:45 AM, Kevin Burton wrote:
> I am having a hard time with the clipboard so I will reproduce the
> output as best as I can:
>
> 2066 tty1 S+ 0:00 grep --color=auto postgresql

So  Postgres is not actually running. What you are seeing is the grep
command.
If it where running you would see something like:

29041 ?  S    0:01 /usr/lib/postgresql/8.4/bin/postgres -D
/var/lib/postgresql/8.4/main -c
config_file=/etc/postgresql/8.4/main/postgresql.conf


Try:

sudo /etc/init.d/postgresql-9.1 start

This should start Postgres.

Then do:

sudo -u postgres psql

>
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
> Sent: Thursday, November 01, 2012 8:42 AM
> To: Kevin Burton
> Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] role does not exist
>
> On 11/01/2012 06:38 AM, Kevin Burton wrote:
>> Dpkg -l | grep postgresql shows
>>       postgresql-9.1
>>       postgresql-common
>>       postgresql-client-common
>>       postgresql-doc
>>       postgresql-doc-9.1
>> Ps -ax | grep postgresql shows
>>       Postgresql
>
> Please show the actual output from the ps command.
>
>
>>
>> --
>> Adrian Klaver
>> adrian.klaver@gmail.com
>>
>>
>
>


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Burton"
Date:
If I use vi as my editor how do I copy the text to the clipboard?

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris Angelico
Sent: Thursday, November 01, 2012 8:57 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On Fri, Nov 2, 2012 at 12:51 AM, Kevin Burton <rkevinburton@charter.net>
wrote:
> If you change the grep to postgres then there are a number of entries
> (about 17). The output since I don't have a clipboard is too much to
> try and type in by hand.

Try this:

ps ax| grep postgresql >processes.txt

Then open processes.txt in an editor. You may be able to use the clipboard
more easily that way.

ChrisA


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



Re: role does not exist

From
"Kevin Burton"
Date:
I put the mouse in the command window and I don't see anything getting
selected.

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 8:58 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 06:51 AM, Kevin Burton wrote:
> If you change the grep to postgres then there are a number of entries
> (about 17). The output since I don't have a clipboard is too much to
> try and type in by hand.
>

If you are seeing the above in a terminal then use the mouse to select the
area and then right click and select copy.

>
>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>
>
>


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Burton"
Date:
Yes. This is what I did. It shows a number of entries but I cannot get the clipboard to work so for now I cannot detail
allof the entries. 

-----Original Message-----
From: Kevin Grittner [mailto:kgrittn@mail.com]
Sent: Thursday, November 01, 2012 8:51 AM
To: Adrian Klaver; Kevin Burton
Cc: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

Adrian Klaver wrote:

> What does ps ax| grep postgresql show?

Are you sure you don't want this?:

  ps ax | grep postgres

-Kevin



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 07:00 AM, Kevin Burton wrote:
> I do see actually three lines with a -D in it that may be similar:
>
> 1166 ? S 0:01 /usr/bin/postgres -C -D /var/lib/postgres-xc/coord
> 1214 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode1
> 1233 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode2
>
> There are a number of entries of the form:
>
> 1185 ? Ss 0:10 postgres: pooler process
>

That is not what you said you installed. It is Postgres-XC, a clustering
software. Not only that there is pooling software between you and the
database. Are you working with different machines?


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 1:06 AM, Kevin Burton <rkevinburton@charter.net> wrote:
> If I use vi as my editor how do I copy the text to the clipboard?

I would recommend picking an editor that matches the way you post to
the list. For example, I use webmail with a GUI web browser, so the
editor that I'd use to copy to the clipboard would be one running in
the same X session (or, when I happen to be on Windows, on the same
Windows computer).

Alternatively, you may be able to directly import from a file into an
email. Again, you'd have to know your mailer.

ChrisA


Re: role does not exist

From
"Kevin Burton"
Date:
I am not running on multiple machines. I think that initdb or something like
it was not installed so it when I tried to invoke it Iwas met with an error
that initdb is in the postgres-xc package and then told me how to install
it. Not having known that postgres-xc is clustering software I just did what
I was told. If that is my mistake then how do I uninstall it? Or is it
easier to install the OS again?

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 9:11 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 07:00 AM, Kevin Burton wrote:
> I do see actually three lines with a -D in it that may be similar:
>
> 1166 ? S 0:01 /usr/bin/postgres -C -D /var/lib/postgres-xc/coord
> 1214 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode1
> 1233 ? S 0:01 /usr/bin/postgres -X -D /var/lib/postgres-xc/datanode2
>
> There are a number of entries of the form:
>
> 1185 ? Ss 0:10 postgres: pooler process
>

That is not what you said you installed. It is Postgres-XC, a clustering
software. Not only that there is pooling software between you and the
database. Are you working with different machines?


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Burton"
Date:
I am not working on the same machine that I read email from. The machine
that has the Linux Server on it has no GUI installed.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris Angelico
Sent: Thursday, November 01, 2012 9:14 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On Fri, Nov 2, 2012 at 1:06 AM, Kevin Burton <rkevinburton@charter.net>
wrote:
> If I use vi as my editor how do I copy the text to the clipboard?

I would recommend picking an editor that matches the way you post to the
list. For example, I use webmail with a GUI web browser, so the editor that
I'd use to copy to the clipboard would be one running in the same X session
(or, when I happen to be on Windows, on the same Windows computer).

Alternatively, you may be able to directly import from a file into an email.
Again, you'd have to know your mailer.

ChrisA


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



Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 1:18 AM, Kevin Burton <rkevinburton@charter.net> wrote:
> I am not working on the same machine that I read email from. The machine
> that has the Linux Server on it has no GUI installed.

In that case, two options:

1) Copy and paste from your SSH session locally
2) Transfer the file processes.txt to your local computer, then open
it in an editor locally.

ChrisA


Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 07:16 AM, Kevin Burton wrote:
> I am not running on multiple machines. I think that initdb or something like
> it was not installed so it when I tried to invoke it Iwas met with an error
> that initdb is in the postgres-xc package and then told me how to install
> it. Not having known that postgres-xc is clustering software I just did what
> I was told. If that is my mistake then how do I uninstall it? Or is it
> easier to install the OS again?

You should not have to reinstall the OS that is a Windows thing. A
fuller explanation of how you got to this point would be helpful though.

What version of Ubuntu are you on?

What Postgres did you initially install?

Did you install any other packages when you encountered the error, other
than Postgres-XC?

FYI as far as I know when you use the Ubuntu(Debian) package it runs
initdb as part of the install and you should not have to.


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
The version of Ubuntu is 12.10.

I am not sure what version of PostgreSQL it install but it is now 9.1

No other packages were installed (I installed 'make' to try and see the
documentation).

So how do I uninstall postgreSQL-XC if that is the problem?

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 9:34 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 07:16 AM, Kevin Burton wrote:
> I am not running on multiple machines. I think that initdb or
> something like it was not installed so it when I tried to invoke it
> Iwas met with an error that initdb is in the postgres-xc package and
> then told me how to install it. Not having known that postgres-xc is
> clustering software I just did what I was told. If that is my mistake
> then how do I uninstall it? Or is it easier to install the OS again?

You should not have to reinstall the OS that is a Windows thing. A fuller
explanation of how you got to this point would be helpful though.

What version of Ubuntu are you on?

What Postgres did you initially install?

Did you install any other packages when you encountered the error, other
than Postgres-XC?

FYI as far as I know when you use the Ubuntu(Debian) package it runs initdb
as part of the install and you should not have to.


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 07:38 AM, Kevin Burton wrote:
> The version of Ubuntu is 12.10.
>
> I am not sure what version of PostgreSQL it install but it is now 9.1
>
> No other packages were installed (I installed 'make' to try and see the
> documentation).
>
> So how do I uninstall postgreSQL-XC if that is the problem?
>
>

Not sure how you are doing the installs/removals.

If you are using GUI interface i.e Synaptic then search for postgres-xc
and then follow removal procedure.

If from the command line:
To get the name of the packages:
    dpkg -l|grep postgres-xc
Then
    sudo apt-get purge whatever_package_name




--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
I had to install postgresql-client-common and postgresql-client-9.1 to get
psql it said that psql was in postgresql-client-common AND postgresql-xc.
Now that I know to avoid 'xc' I choose the common and rebooted. Then I tried
to run psql and I was met with an error that at least one of
postgresql-client-<version> had to be installed so I installed
postgresql-client-9.1. Now when I run psql I get the error:

psql: could not connect to server: not such file or directory . . . .

Now what?

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 9:51 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 07:38 AM, Kevin Burton wrote:
> The version of Ubuntu is 12.10.
>
> I am not sure what version of PostgreSQL it install but it is now 9.1
>
> No other packages were installed (I installed 'make' to try and see
> the documentation).
>
> So how do I uninstall postgreSQL-XC if that is the problem?
>
>

Not sure how you are doing the installs/removals.

If you are using GUI interface i.e Synaptic then search for postgres-xc and
then follow removal procedure.

If from the command line:
To get the name of the packages:
    dpkg -l|grep postgres-xc
Then
    sudo apt-get purge whatever_package_name




--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Burton"
Date:
I also tried 'initdb' and I get an error 'The program "initdb" is currently
not installed. You can install it by typing:  sudo apt-get install
postgres-xc'. I didn't do anything since that led to the earlier problem.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris Angelico
Sent: Thursday, November 01, 2012 8:58 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On Fri, Nov 2, 2012 at 12:56 AM, Chris Angelico <rosuav@gmail.com> wrote:
> On Fri, Nov 2, 2012 at 12:51 AM, Kevin Burton <rkevinburton@charter.net>
wrote:
>> If you change the grep to postgres then there are a number of entries
>> (about 17). The output since I don't have a clipboard is too much to
>> try and type in by hand.
>
> Try this:
>
> ps ax| grep postgresql >processes.txt
>
> Then open processes.txt in an editor. You may be able to use the
> clipboard more easily that way.

And per the other posts, change postgresql to postgres for more useful
results. But you already knew that. :)

ChrisA


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



Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 08:06 AM, Kevin Burton wrote:
> I had to install postgresql-client-common and postgresql-client-9.1 to get
> psql it said that psql was in postgresql-client-common AND postgresql-xc.
> Now that I know to avoid 'xc' I choose the common and rebooted. Then I tried
> to run psql and I was met with an error that at least one of
> postgresql-client-<version> had to be installed so I installed
> postgresql-client-9.1. Now when I run psql I get the error:
>
> psql: could not connect to server: not such file or directory . . . .
>
> Now what?

You have the client side installed but not the server side. You need to
install the postgresql package. I have to run, will be away from
computer for awhile. Good luck.


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
"Kevin Burton"
Date:
Sudo -u postgres psql - now works!! Thank you. Now how do I add a role so
that I don't have to use sudo?

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
Sent: Thursday, November 01, 2012 10:13 AM
To: Kevin Burton
Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On 11/01/2012 08:06 AM, Kevin Burton wrote:
> I had to install postgresql-client-common and postgresql-client-9.1 to
> get psql it said that psql was in postgresql-client-common AND
postgresql-xc.
> Now that I know to avoid 'xc' I choose the common and rebooted. Then I
> tried to run psql and I was met with an error that at least one of
> postgresql-client-<version> had to be installed so I installed
> postgresql-client-9.1. Now when I run psql I get the error:
>
> psql: could not connect to server: not such file or directory . . . .
>
> Now what?

You have the client side installed but not the server side. You need to
install the postgresql package. I have to run, will be away from computer
for awhile. Good luck.


--
Adrian Klaver
adrian.klaver@gmail.com



Re: role does not exist

From
"Kevin Grittner"
Date:
Kevin Burton wrote:

> how do I add a role [...] ?

http://www.postgresql.org/docs/9.2/interactive/database-roles.html

-Kevin


Re: role does not exist

From
Prashanth Kumar
Date:
should  have given the full output earlier

pkumar@ulinux1:~$ sudo su - postgres
[sudo] password for pkumar: 
postgres@ulinux3:~$ createdb authDB
postgres@ulinux3:~$ createuser -P -l authuser
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) y
postgres@ulinux3:~$ psql authDB
psql (8.4.11)
Type "help" for help.

authDB=# 



> From: rkevinburton@charter.net
> To: adrian.klaver@gmail.com
> CC: jd@commandprompt.com; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] role does not exist
> Date: Thu, 1 Nov 2012 10:21:31 -0500
>
> Sudo -u postgres psql - now works!! Thank you. Now how do I add a role so
> that I don't have to use sudo?
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@gmail.com]
> Sent: Thursday, November 01, 2012 10:13 AM
> To: Kevin Burton
> Cc: 'Joshua D. Drake'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] role does not exist
>
> On 11/01/2012 08:06 AM, Kevin Burton wrote:
> > I had to install postgresql-client-common and postgresql-client-9.1 to
> > get psql it said that psql was in postgresql-client-common AND
> postgresql-xc.
> > Now that I know to avoid 'xc' I choose the common and rebooted. Then I
> > tried to run psql and I was met with an error that at least one of
> > postgresql-client-<version> had to be installed so I installed
> > postgresql-client-9.1. Now when I run psql I get the error:
> >
> > psql: could not connect to server: not such file or directory . . . .
> >
> > Now what?
>
> You have the client side installed but not the server side. You need to
> install the postgresql package. I have to run, will be away from computer
> for awhile. Good luck.
>
>
> --
> 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

Re: role does not exist

From
"Kevin Burton"
Date:
Now I get psql: FATAL: role "kevin" is not permitted to log in

-----Original Message-----
From: Kevin Grittner [mailto:kgrittn@mail.com]
Sent: Thursday, November 01, 2012 10:31 AM
To: Kevin Burton; Adrian Klaver
Cc: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

Kevin Burton wrote:

> how do I add a role [...] ?

http://www.postgresql.org/docs/9.2/interactive/database-roles.html

-Kevin



Re: role does not exist

From
Vincent Veyron
Date:
Le jeudi 01 novembre 2012 à 10:21 -0500, Kevin Burton a écrit :
> Sudo -u postgres psql - now works!! Thank you. Now how do I add a role so
> that I don't have to use sudo?
>


http://www.postgresql.org/docs/9.1/static/app-createuser.html



--
Vincent Veyron
http://marica.fr/
Logiciel de gestion des assurances sinistres et des dossiers contentieux pour le service juridique



Re: role does not exist

From
"Kevin Burton"
Date:
That is the problem. There doesn't seem to be any copy on the Linux shell
that I am running (I think it is bash).


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris Angelico
Sent: Thursday, November 01, 2012 9:21 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] role does not exist

On Fri, Nov 2, 2012 at 1:18 AM, Kevin Burton <rkevinburton@charter.net>
wrote:
> I am not working on the same machine that I read email from. The
> machine that has the Linux Server on it has no GUI installed.

In that case, two options:

1) Copy and paste from your SSH session locally
2) Transfer the file processes.txt to your local computer, then open it in
an editor locally.

ChrisA


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



Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 8:56 AM, Kevin Burton <rkevinburton@charter.net> wrote:
>
> That is the problem. There doesn't seem to be any copy on the Linux shell
> that I am running (I think it is bash).

My crystal ball tells me that you're SSHing to your remote server,
running SSH in some kind of local terminal. It's the local terminal
that will offer copy/paste facilities. Without knowing more about that
I cannot advise, but Adrian suggested last night that you should try
right-clicking.

ChrisA


Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 02:56 PM, Kevin Burton wrote:
> That is the problem. There doesn't seem to be any copy on the Linux shell
> that I am running (I think it is bash).
>

At a guess you are running the commands from the wrong shell. I asked
before whether you are running from different machines and you said not.
It would seem otherwise. When you have a terminal open(assuming ssh) to
the server machine you are working on a different machine. It is easy to
lose track of what machine you are logged into and issue commands that
are for a program that is not installed on the machine you are logged
into. I would suggest taking a moment and determine which machine you
are working on and what is installed on that machine, assuming it is the
one with the Postgres server. Otherwise this turns into an Abbott and
Costello routine:)


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
Adrian Klaver
Date:
On 11/01/2012 03:03 PM, Chris Angelico wrote:
> On Fri, Nov 2, 2012 at 8:56 AM, Kevin Burton <rkevinburton@charter.net> wrote:
>>
>> That is the problem. There doesn't seem to be any copy on the Linux shell
>> that I am running (I think it is bash).
>
> My crystal ball tells me that you're SSHing to your remote server,
> running SSH in some kind of local terminal. It's the local terminal
> that will offer copy/paste facilities. Without knowing more about that
> I cannot advise, but Adrian suggested last night that you should try
> right-clicking.

Yes, use mouse to drag and select, then right click on selected area and
select the copy option.

>
> ChrisA
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: role does not exist

From
Chris Angelico
Date:
On Fri, Nov 2, 2012 at 10:35 AM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
> On 11/01/2012 03:03 PM, Chris Angelico wrote:
>>
>> My crystal ball tells me that you're SSHing to your remote server,
>> running SSH in some kind of local terminal. It's the local terminal
>> that will offer copy/paste facilities. Without knowing more about that
>> I cannot advise, but Adrian suggested last night that you should try
>> right-clicking.
>
>
> Yes, use mouse to drag and select, then right click on selected area and
> select the copy option.

Ah. The other option, which I thought you were advocating, is to
right-click first and look for a "Mark" option. But be careful; IIRC a
right-click immediately pastes into PuTTY.

Really, the best option is to actually know your client.

ChrisA


Re: role does not exist

From
Craig Ringer
Date:
On 11/01/2012 11:46 PM, Kevin Burton wrote:
> Now I get psql: FATAL: role "kevin" is not permitted to log in
Did you perhaps CREATE ROLE without the LOGIN option?

--
Craig Ringer


Re: role does not exist

From
Kevin Burton
Date:
I was not aware of the login option. That is probably the solution. Thank you.

On Nov 2, 2012, at 10:43 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:

> On 11/01/2012 11:46 PM, Kevin Burton wrote:
>> Now I get psql: FATAL: role "kevin" is not permitted to log in
> Did you perhaps CREATE ROLE without the LOGIN option?
>
> --
> Craig Ringer


Re: role does not exist

From
Craig Ringer
Date:
On 11/03/2012 12:17 PM, Kevin Burton wrote:
> I was not aware of the login option. That is probably the solution. Thank you.
You can ALTER the user to add the LOGIN right, or just DROP it and
re-CREATE it again.

CREATE USER is shorthand for CREATE ROLE ... LOGIN

--
Craig Ringer