Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
497
|
Version |
tigase-server-5.1.0
|
Issue Votes (0)
Watchers (0)
Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
497
|
Version |
tigase-server-5.1.0
|
I just noticed that some of the stored procedures for postgres are not properly working in Tigase.
As you can see in https://projects.tigase.org/projects/tigase-server/repository/entry/trunk/database/postgresql-schema-4-sp.schema, more precisely in the TigAllUsers() function, there is a return clause prior to the select clause, and the return of the function is void.
Thus, when I try to use the method getUsers() from the userRepository in a new ad-hoc command, it returns an empty list of jids.
IMHO, these functions can be written in a less verbose way by using plain sql, just like this:
-- QUERY START:
-- List of all users in database
create or replace function TigAllUsers() returns setof record as
LANGUAGE 'sql';
-- QUERY END:
I'm not sure if the current code in the JDBCRepository class will be able to parse the results of this query, but it seems to be working in the psql client.