Arturo Bernal created JSPWIKI-1374:
--------------------------------------
Summary: The PostgreSQL script that creates the user database
tables does not run on PostgreSQL
Key: JSPWIKI-1374
URL: https://issues.apache.org/jira/browse/JSPWIKI-1374
Project: JSPWiki
Issue Type: Bug
Reporter: Arturo Bernal
postgresql.ddl, the script the war ships to create the tables on PostgreSQL,
has never run on PostgreSQL. The users table is not created: the column list
ends with a trailing comma, and it uses HSQL types (longvarchar,
varchar_ignorecase). It also ends with commented out drop statements written
with the HSQL comment character, which PostgreSQL rejects, and the create user
statement uses the nocreateuser option, which PostgreSQL no longer accepts. The
script does not define the oldhashes column either (see JSPWIKI-1373).
Checked on PostgreSQL 16: the script fails on the users table and on the create
user statement.
The fix keeps the behaviour of the HSQL script: the e-mail column is compared
ignoring case, as the lookup of JDBCUserDatabase (WHERE email=?) needs, through
a non deterministic ICU collation (PostgreSQL 12 or later), attributes and
oldhashes are text, and the commented drops use the PostgreSQL comment. A
citext column was tried first and rejected: the JDBC driver sends the e-mail as
text and the comparison is then case sensitive.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)