Bug #2395
db admin rights requirement for the system table query
0%
History
#1 Updated by Ovidiu Maxiniuc over 9 years ago
In PostgreSQLSequenceHandler.safeContains
the query on a system table requires DB admin rights. For development and testing, we usually use a database superuser account so this is not an issue. However, in a production environment the DB user usually/normally is a limited user so this code would break.
At this moment, previous applications in production don't use sequences, so it won't be an issue, but the current conversion project we are working on does, so they need to grant the Hibernate database user account at least read access to the pg_catalog
schema (or at least the pg_class
table).
Because of the lack of other methods for getting information about sequences, all three implementation of sequence handlers use various queries on system tables, mainly for finding the current value of a sequence (feature that all SQL engines lack).
The SequenceHandler.contains
was implemented for finding the database when the P4GL code is not explicit. To avoid accessing system tables, the static informations about sequences (here only the list of legacy names for each database) can be extracted from other locations (like dmo-index
), assuming that the sequences in the database were not altered outside the application.