trebb/p-rout

CAST works only with superuser rights

Opened this issue · 0 comments

Hi,

the DROP CAST and CREATE CAST Commands in postgresql will only work with superuser rights in the database.

The symptom is that only the Power Router ID can be readout out, anything else will return nothing.

How to cure:

su - postgres
psql p_rout
CREATE CAST (text AS double precision) WITH INOUT AS IMPLICIT;

After this operation, the values are readout correctly and the application runs very well (even on a raspberry PI)

One more note:

these two lines in p-rout-view.scm can be removed (instead there should be script for setting up the database which must be run as superuser):
(logged-query "db" "DROP CAST IF EXISTS (text AS double precision)")
(logged-query
"db" "CREATE CAST (text AS double precision) WITH INOUT AS IMPLICIT")

Sincerly,
Klaus