You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the siikr DB user is specified in the siikr.conf file, it should be reflected in the SQL as well. To fix this, I think it may be worth splitting up the SQL into a static file that has all of the database creation stuff and function definitions, and then a "template" SQL file that uses the environment variables defined in siikr.conf.
So the SQL template file might look something like this:
GRANT ALL ON FUNCTION public.vector_out(public.vector) TO ${pg_user};
GRANT ALL ON FUNCTION public.vector_recv(internal, oid, integer) TO ${pg_user};
-- ...etc
and then doing an envsubst to create this custom file somewhere (and hopefully cleaning it up afterwards)
hardcoding the GRANT commands into the setup script and having them run after the .sql file (which avoids the cleanup).
removing the GRANT commands entirely, and changing the default db_user in the .conf file to "postgres", which has all permissions to everything by default.
See: https://github.com/EGjoni/Siikr/blob/main/siikr/siikr_db_setup.sql#L942
Since the siikr DB user is specified in the siikr.conf file, it should be reflected in the SQL as well. To fix this, I think it may be worth splitting up the SQL into a static file that has all of the database creation stuff and function definitions, and then a "template" SQL file that uses the environment variables defined in siikr.conf.
So the SQL template file might look something like this:
and then doing an
envsubst
to create this custom file somewhere (and hopefully cleaning it up afterwards)Unless there's an easier way to do it.
The text was updated successfully, but these errors were encountered: