Re: newbie problem on creating table
От | Thomas Krebs |
---|---|
Тема | Re: newbie problem on creating table |
Дата | |
Msg-id | 001801bfebd8$53b99dc0$4942363e@sokrates обсуждение исходный текст |
Ответ на | newbie problem on creating table ("Thomas Krebs" <thomas@krebs-haertl.de>) |
Ответы |
Re: newbie problem on creating table
|
Список | pgsql-novice |
> >> >I am trying to get a start with Postgres 6.4 on Suse Linux 6.4. > >> I did that just 2 weeks ago. > > > >and it works? > yes, no problems : > root@hanlrs:/tmp > su -- postgres > postgres@hanlrs:/tmp > PATH=$PATH:/usr/lib/pgsql/bin > postgres@hanlrs:/tmp > createuser > Enter name of user to add: root > Shall the new user be allowed to create databases? (y/n) y > Shall the new user be allowed to create more new users? (y/n) y > CREATE USER > postgres@hanlrs:/tmp > exit > root@hanlrs:/tmp > createuser nobody > Shall the new user be allowed to create databases? (y/n) y > Shall the new user be allowed to create more new users? (y/n) n > CREATE USER > root@hanlrs:/tmp > su -- nobody > nobody@hanlrs:/tmp > PATH=$PATH:/usr/lib/pgsql/bin > nobody@hanlrs:/tmp > createdb test > CREATE DATABASE > nobody@hanlrs:/tmp > psql -dtest -c "create table test1( a int)" > CREATE > nobody@hanlrs:/tmp > psql -dtest > Welcome to psql, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help on internal slash commands > \g or terminate with semicolon to execute query > \q to quit > > test=> insert into test1 values (1); > INSERT 621408 1 > test=> select * from test1 > test-> \g > a > --- > 1 > (1 row) > > test=> I deinstalled and installed postgres and executed exactly the same statements as you, and it worked. One thing I am not sure about is during creation of a user, I am asked whether to use a postgres ID or UNIX ID, what is the right/recommended approach (I used UNIX ID). Then I created a new database "castortest". I tried to execute a file creating a schema with a bunch of tables and index definitions with psql -dcastortest -f create.sql This returned an error with the first create table statement. Any attempt after that, even after reboot, to create a table failed. Below is the postgresql.log file ----- TRAP: Failed Assertion("!(((bool) (UserId != 0))):", File: "miscinit.c", Line: 446) !(((bool) (UserId != 0))) (0) [Unpassender IOCTL (I/O-Control) für das Gerät] ERROR: cannot create prod ERROR: DefineIndex: prod relation not found TRAP: Failed Assertion("!(((bool) (UserId != 0))):", File: "miscinit.c", Line: 446) !(((bool) (UserId != 0))) (0) [Unpassender IOCTL (I/O-Control) für das Gerät] ERROR: cannot create prod TRAP: Failed Assertion("!(((bool) (UserId != 0))):", File: "miscinit.c", Line: 446) !(((bool) (UserId != 0))) (0) [Unpassender IOCTL (I/O-Control) für das Gerät] TRAP: Failed Assertion("!(((bool) (UserId != 0))):", File: "miscinit.c", Line: 446) !(((bool) (UserId != 0))) (0) [Unpassender IOCTL (I/O-Control) für das Gerät] ERROR: cannot create test2 ERROR: test2: Table does not exist. TRAP: Failed Assertion("!(((bool) (UserId != 0))):", File: "miscinit.c", Line: 446) !(((bool) (UserId != 0))) (0) [Unpassender IOCTL (I/O-Control) für das Gerät] > -- > Bernd Tegge mailto:tegge@repas-aeg.de > Tel: ++49-511-87449-12 repas AEG Automation GmbH > Fax: ++49-511-87449-20 GS Hannover, Germany > >
В списке pgsql-novice по дате отправления: