Subject: creation problem

From: Drunkard Terry <[email-masked]>
Date: Sun, 05 Feb 1995 10:51:29 +0900

Now, I tried to create new database. 
"make" finish, so I use command to create the database.

---------------------------------
dec324[150]% createdb temp
FATAL 1:Feb  5 10:34:58:User yutaka-i is not in pg_user
 
createdb: database creation failed on temp.
---------------------------------

I thought "I'll create my username on postgres."
so I used "createuser" command.

---------------------------------
dec324[152]% createuser yutaka-i
createuser: database access failed.
---------------------------------

why not? postmaster is running, initdb has finished.
There are something else to create database?

Machine is DECstation 5000/25.
Postgres version is v4r0.

Thanks.

---------------- Terry [G'Job !]

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]".
   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/

---

From: [email-masked]
Date: Mon, 6 Feb 1995 16:25:15 -0500 (EST)

Excerpts from internet.postgres: 5-Feb-95 creation problem Drunkard
[email-masked] (1239*)

> Postgres version is v4r0.

The problem is that when you compile Postgres, the only user who can do
anything initially is the user specified in Makefile.global in the
"POSTGRESLOGIN" variable.

To use "createuser", you have one of two choices:

1.)  Login as the user specified in Makefile.global (usually user
"postgres" unless you changed it). and add yourself as a user with
createuser.

2.) Edit the file $POSTGRESHOME/data/files/global1.bki and add yourself
to the pg_user class (See example below).  After doing this, you will
need to rerun initdb.

example:
There should be a line that looks similar to this in global1.bki:

insert OID = 0 ( postgres 6543 t t t t )

postgres is the database superuser's login
6543 is the superuser's Unix UID.

To have yourself added as a superuser of the database, add the following
line directly below the one shown above:

insert OID = 1 ( rp2y 3456 t t t t )

where rp2y is your login name
    and 3456 is your Unix UID.

NOTE:  This file is ONLY used by "initdb" so you will need to run
"cleardbdir" and then "initdb".

Robert

---

From: Drunkard Terry <[email-masked]>
Date: Fri, 10 Feb 1995 12:10:37 +0900

Thanks your advise.

From: [email-masked]
Subject: Re: creation problem
Date: Mon,  6 Feb 1995 16:25:15 -0500 (EST)

>     and 3456 is your Unix UID.

so, I successed initdb, so use postgres.
I can use it in "monitor" mode.

but, I tried use postgres directry from unix , 
----------------------------
dec324[281]% monitor -TN -c "append ticket (number="3", status="open",
opener="yutaka-i")" ntemp
WARN:Feb 10 12:01:56:typeid_get_relid: Invalid type - oid = 357 
----------------------------
in monitor mode,
----------------------------
Go 
* append ticket (number="3", status="open",opener="yutaka-i")\g

Query sent to backend is "append ticket (number="3",
status="open",opener="yutaka-i")"
APPEND 20224
----------------------------
successful.

why I cannot use postgres directry from unix?

---
:  Drunkard Terry <[email-masked]>
:  Graduate School of Information Science
:  Nara Institute of Science and Technology

---

From: [email-masked]
Date: Fri, 10 Feb 1995 10:36:12 -0500 (EST)

Excerpts from internet.postgres: 10-Feb-95 Re: creation problem Drunkard
[email-masked] (2052*)

> WARN:Feb 10 12:01:56:typeid_get_relid: Invalid type - oid = 357 

Try quoting the quotes.

% monitor -TN -c "append ticket (number = 3, status=\"open\",
opener=\"yutaka-i\")" ntemp

I left out the quotes on the number 3 because quotes aren't needed for
numbers (unless they are stored as strings).

Robert

---

From: [email-masked]
Date: Fri, 10 Feb 1995 10:36:12 -0500 (EST)

Try quoting the quotes.

Robert