[Ur] Fatal initialization error: Table 'uw_board_post' does not exist.

Stefan Scott Alexander stefanscottalexx at gmail.com
Sat May 16 02:48:29 EDT 2015


Hello Alex,

Thank you for your prompt reply.

Actually I am sure that the Postgres database and table do exist.

I am also fairly sure that the user 'admin' (who is running the Ur/Web
server) has permissions to access the database.

(I realize there is sometimes confusion between the *Postgres* user 'admin'
and the *Linux* user 'admin'. I may have not configured that properly. But
I did later grant permissions on database 'urboard' to 'public' - which
would seem to allow *any* user to access the database 'urboard').

This existence of the database 'urboard' can be verified by inspecting the
relevant portions of the transcript included in the question originally
posted, namely:

postgres=# grant all on database urboard to admin;
GRANT
postgres=# \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access
privileges
-----------+----------+----------+-------------+------------
-+-----------------------
 crud1     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=CTc/postgres        +
           |          |          |             |             |
postgres=CTc/postgres+
           |          |          |             |             |
admin=CTc/postgres
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres          +
           |          |          |             |             |
postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres          +
           |          |          |             |             |
postgres=CTc/postgres
 test      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=Tc/postgres         +
           |          |          |             |             |
postgres=CTc/postgres+
           |          |          |             |             |
admin=CTc/postgres
 urboard   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=CTc/postgres        +
           |          |          |             |             |
postgres=CTc/postgres+
           |          |          |             |             |
admin=CTc/postgres
(6 rows)

postgres=# \c urboard
You are now connected to database "urboard" as user "postgres".
urboard=# \d
                List of relations
 Schema |       Name        |   Type   |  Owner
--------+-------------------+----------+----------
 public | uw_board_board    | table    | postgres
 public | uw_board_boardseq | sequence | postgres
 public | uw_board_forum    | table    | postgres
 public | uw_board_forumseq | sequence | postgres
 public | uw_board_post     | table    | postgres
 public | uw_board_postseq  | sequence | postgres
 public | uw_user_user      | table    | postgres
 public | uw_user_userseq   | sequence | postgres
(8 rows)

So it seems that there is something else going on.

As far as I can see:

- The database 'urboard' exists
- The Postgres user 'admin' has been granted all privileges on database
'urboard'
- (However, I'm not sure if the *Linux* user 'admin' also needs to be
granted some privileges.)
- To be extra certain, I granted all privileges on database 'urboard' to
'public' - then recompiled, and re-ran the sql script - and still got the
same error.

This makes me suspect that something might be going wrong involving
camelcase versus lowercase in Postgres versus MySQL on Windows versus Linux.

In this case, I am using Linux (Debian 8 Jessie) and Postgres (9.4.1).

The most suspicious-looking thing to me is:

The sql script uses *camelcase* for the table name - but the error message
uses *lowercase*.

I think some changes were made to the Ur/Web compiler recently, to handle
certain issues regarding camelcase versus lowercase using MySQL on Windows
or Linux.

I am wondering if those changes may have inadvertently impacted Postgres on
Linux as well?

###
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20150516/63bd1e39/attachment-0001.html>


More information about the Ur mailing list