[
https://issues.apache.org/jira/browse/JSPWIKI-1374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147913#comment-18147913
]
ASF subversion and git services commented on JSPWIKI-1374:
----------------------------------------------------------
Commit 3c39d818edc9a9c4053492a520c0b7f51abd2d56 in jspwiki's branch
refs/heads/master from Arturo Bernal
[ https://gitbox.apache.org/repos/asf?p=jspwiki.git;h=3c39d818e ]
JSPWIKI-1374 Make the PostgreSQL user database script run on PostgreSQL
The script ended the column list of the users table with a comma and used
HSQL types, so the table was not created. It also used the HSQL comment
character and an option of create user that PostgreSQL no longer accepts,
and it did not define the oldhashes column.
The e-mail column is compared ignoring case, as the lookup of
JDBCUserDatabase needs, through a non deterministic collation; a citext
column is compared as text by the JDBC driver and does not do that.
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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)