Unable to run createlang (or psql for that matter)
If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not found
as one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu in
pgAdmin3 and selecting (the only selection) psql.
My $PATH variable includes the path to both createlang and psql.
What am I doing wrong?
John
I have made some progress by looking at the documentation and at how
Mac OSX sets up privileges.
If I su to root and then su to postgres, I can access createlang and
psql (although my user $PATH seems to be inoperative).
What I can't do is su from me as user (not root) to postgres. I get
asked for a password that is not any password that exists. For
example, it is not the password that postgres uses to get to the
databases.
I am now going to see if I can find the mystery password for postgres.
On Apr 25, 2010, at 11:08 AM, John Gage wrote:
Show quoted text
If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu
in pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
What am I doing wrong?
John
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Question withdrawn.
Answered via documentation.
On Apr 25, 2010, at 11:08 AM, John Gage wrote:
Show quoted text
If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu
in pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
What am I doing wrong?
John
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Sun, Apr 25, 2010 at 11:08 AM, John Gage <jsmgage@numericable.fr> wrote:
If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu in
pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
What am I doing wrong?
John
What's your output for these commands?
which createlang
which psql
Show quoted text
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Fascinatingly, to me at least, as follows (I threw in "which bash"):
JohnGage:~ johngage$ which createlang
JohnGage:~ johngage$ which psql
JohnGage:~ johngage$ which bash
/bin/bash
i.e. zilch
Here's what I am able to do:
JohnGage:~ johngage$ su postgres
Password:
su: Sorry
JohnGage:~ johngage$ sudo su postgres
bash-3.2$ which createlang
bash-3.2$ which psql
bash-3.2$ cd /Library/PostgreSQL/8.4/bin
bash-3.2$ ./createlang -l
Password:
Procedural Languages
Name | Trusted?
------+----------
In the "su:Sorry" after my attempt at a password for user "postgres" I
am only showing that all the possible and the true password for
postgres don't work. No password works, i.e., you can't get there
from here.
However, when I su as superuser (using not the root password but my
"administrator" password on the Mac) I get to postgres. Postgres too
is unable to get any response for "which" but postgres can run
createlang from the bin directory.
A very key difficulty is that if I attempt to add postgres as a user
to my system, my system tells me postgres already is a user. But,
unfortunately, postgres as a user on my system has no password. His
postgresql password does not work on the system.
John
On Apr 26, 2010, at 9:36 AM, Jorge Arevalo wrote:
Show quoted text
On Sun, Apr 25, 2010 at 11:08 AM, John Gage <jsmgage@numericable.fr>
wrote:If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu in
pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
What am I doing wrong?
John
What's your output for these commands?
which createlang
which psql--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Mon, Apr 26, 2010 at 8:55 AM, John Gage <jsmgage@numericable.fr> wrote:
A very key difficulty is that if I attempt to add postgres as a user to my
system, my system tells me postgres already is a user. But, unfortunately,
postgres as a user on my system has no password. His postgresql password
does not work on the system.
The account doesn't have a password by default as it's a service
account and you shouldn't need to use it interactively.
If you really want to though, just set a password:
gator:~ dpage$ sudo passwd postgres
Changing password for postgres.
New password:
Retype new password:
gator:~ dpage$ su - postgres
Password:
gator:~ postgres$
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company
Thank you.
The reason I wanted to use it interactively is, at base, ignorance.
I do not completely remember everything that happened when I installed
Postgresql (on Mac OSX). I did it with the Enterprise installer,
however, that I do remember.
But what I begin to think is that *any* installation procedure for
Postgres should/must include a blocking requirement that the installer
set up a user account before the installation can proceed.
I would not even know that the user "postgres" existed had it not been
for the fact that I kept tripping up over lack of access with my user
account to the database (hence for example my placing files the
database needs to access *outside* my user account where "postgres"
can get at them).
At least I think that's what has happened.
As is true of so many things in life, I have tripped over a false
dichotomy ("postgres" or "me"). The reality is "postgres" and "me".
John
P.S. Which is not to say that there are not false syntheses in life.
"Guns and butter" leaps to mind.
On Apr 26, 2010, at 10:58 AM, Dave Page wrote:
Show quoted text
On Mon, Apr 26, 2010 at 8:55 AM, John Gage <jsmgage@numericable.fr>
wrote:A very key difficulty is that if I attempt to add postgres as a
user to my
system, my system tells me postgres already is a user. But,
unfortunately,
postgres as a user on my system has no password. His postgresql
password
does not work on the system.The account doesn't have a password by default as it's a service
account and you shouldn't need to use it interactively.If you really want to though, just set a password:
gator:~ dpage$ sudo passwd postgres
Changing password for postgres.
New password:
Retype new password:
gator:~ dpage$ su - postgres
Password:
gator:~ postgres$--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company
Dave Page <dpage@pgadmin.org> wrote:
The account doesn't have a password by default as it's a service
account and you shouldn't need to use it interactively.If you really want to though, just set a password:
gator:~ dpage$ sudo passwd postgres
Changing password for postgres.
New password:
Retype new password:
gator:~ dpage$ su - postgres
Password:
gator:~ postgres$
Or even without a password, from an administrative account which
can use sudo:
$ sudo -i -u postgres
Password:
sapphire:~ postgres$ id
uid=770(postgres) gid=770(postgres)
groups=770(postgres),402(com.apple.sharepoint.group.1),61(localaccounts),12(everyone)
Regards,
Giles
On Mon, Apr 26, 2010 at 3:36 AM, Jorge Arevalo <jorgearevalo@gis4free.org>wrote:
On Sun, Apr 25, 2010 at 11:08 AM, John Gage <jsmgage@numericable.fr>
wrote:If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu in
pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
Not to say I am a 'dis-believer' or anything... but... can we see 'echo
$PATH' ... ?
--Scott
Show quoted text
What am I doing wrong?
John
What's your output for these commands?
which createlang
which psql--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
To be perfectly honest, I don't believe it either, but here it is:
JohnGage:~ johngage$ echo $PATH
/opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/
Library/PostgresPlus/8.4/bin:/usr/local/bin:~/Desktop/WritingTools/
EfficientAWK
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ which createlang
JohnGage:~ johngage$ locate createlang
/Library/PostgreSQL/8.4/bin/createlang
/Library/PostgreSQL/8.4/doc/postgresql/html/app-createlang.html
/Library/PostgreSQL/8.4/doc/postgresql/html/sql-createlanguage.html
/Library/PostgreSQL/8.4/share/man/man1/createlang.1
JohnGage:~ johngage$ cd /Library/PostgreSQL/8.4/bin
JohnGage:bin johngage$ createlang -l
-bash: createlang: command not found
JohnGage:bin johngage$ ./createlang -l
Password:
createlang: could not connect to database johngage: FATAL: database
"johngage" does not exist
JohnGage:bin johngage$ sudo su postgres
bash-3.2$ ./createlang -l
Password:
Procedural Languages
Name | Trusted?
------+----------
bash-3.2$
On Apr 27, 2010, at 1:47 AM, Scott Mead wrote:
Show quoted text
On Mon, Apr 26, 2010 at 3:36 AM, Jorge Arevalo <jorgearevalo@gis4free.org
wrote:
On Sun, Apr 25, 2010 at 11:08 AM, John Gage <jsmgage@numericable.fr>
wrote:If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu
in
pgAdmin3 and selecting (the only selection) psql.
My $PATH variable includes the path to both createlang and psql.
Not to say I am a 'dis-believer' or anything... but... can we see
'echo $PATH' ... ?--Scott
On Mon, Apr 26, 2010 at 8:35 PM, John Gage <jsmgage@numericable.fr> wrote:
To be perfectly honest, I don't believe it either, but here it is:
JohnGage:~ johngage$ echo $PATH
/opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Library/PostgresPlus/8.4/bin:/usr/local/bin:~/Desktop/WritingTools/EfficientAWK
Your path has 'PostgresPlus'
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ which createlang
JohnGage:~ johngage$ locate createlang
/Library/PostgreSQL/8.4/bin/createlang
/Library/PostgreSQL/8.4/doc/postgresql/html/app-createlang.html
/Library/PostgreSQL/8.4/doc/postgresql/html/sql-createlanguage.html
/Library/PostgreSQL/8.4/share/man/man1/createlang.1
Locate shows 'PostgreSQL'
--Scott
Show quoted text
JohnGage:~ johngage$ cd /Library/PostgreSQL/8.4/bin
JohnGage:bin johngage$ createlang -l
-bash: createlang: command not found
JohnGage:bin johngage$ ./createlang -l
Password:
createlang: could not connect to database johngage: FATAL: database
"johngage" does not exist
JohnGage:bin johngage$ sudo su postgres
bash-3.2$ ./createlang -l
Password:
Procedural Languages
Name | Trusted?
------+----------bash-3.2$
On Apr 27, 2010, at 1:47 AM, Scott Mead wrote:
On Mon, Apr 26, 2010 at 3:36 AM, Jorge Arevalo <jorgearevalo@gis4free.org>wrote:
On Sun, Apr 25, 2010 at 11:08 AM, John Gage <jsmgage@numericable.fr>
wrote:If I open a bash terminal and type createlang -l, I get:
JohnGage:~ johngage$ createlang -l
-bash: createlang: command not found
JohnGage:~ johngage$ psql
-bash: psql: command not foundas one can see, the same thing happens with psql.
The way I have been using psql is by pulling down the plugins menu in
pgAdmin3 and selecting (the only selection) psql.My $PATH variable includes the path to both createlang and psql.
Not to say I am a 'dis-believer' or anything... but... can we see 'echo
$PATH' ... ?--Scott