View Issue Details

IDProjectCategoryView StatusLast Update
0005390SOGopublic2021-09-13 21:09
Reporterzhb Assigned Tofrancis  
PriorityhighSeverityminorReproducibilityhave not tried
Status resolvedResolutionno change required 
Product Version5.2.0 
Summary0005390: ModulesConstraints, and SQL column type CHAR(1), VARCHAR(1) in PostgreSQL
Description

Dear developers,

We running SOGo nightly build with PostgreSQL, recently enabled "ModulesConstraints" with configuration below, and the SQL column type is set to CHAR(1) (tried VARCHAR(1) too) with value y, but all modules (webmail, calendar, activesync) are enabled.

Is it a bug of SOGo? or should we change to different SQL column type? And which type?

            ModulesConstraints = {
                Mail = { c_webmail = y; };
                Calendar = { c_calendar = y; };
                ActiveSync = { c_activesync = y; };
            };

Error messages in SOGo log file:

2021-09-12 21:43:32.429 sogod[1220:1220] ERROR(-[PostgreSQL72Channel primaryFetchAttributes:withZone:]): <0x0x5619415cd870[PostgreSQL72Channel]: connection=<0x0x561941392910[PGConnection]:  connection=0x0x561940cb57d0>>: got no value class for column:
  attribute=c_webmail
  type=(null)
2021-09-12 21:43:32.429 sogod[1220:1220] ERROR(-[PostgreSQL72Channel primaryFetchAttributes:withZone:]): <0x0x5619415cd870[PostgreSQL72Channel]: connection=<0x0x561941392910[PGConnection]:  connection=0x0x561940cb57d0>>: got no value class for column:
  attribute=c_calendar
  type=(null)
2021-09-12 21:43:32.429 sogod[1220:1220] ERROR(-[PostgreSQL72Channel primaryFetchAttributes:withZone:]): <0x0x5619415cd870[PostgreSQL72Channel]: connection=<0x0x561941392910[PGConnection]:  connection=0x0x561940cb57d0>>: got no value class for column:
  attribute=c_activesync
  type=(null)
TagsNo tags attached.

Activities

zhb

zhb

2021-09-13 01:59

reporter   ~0015443

Sorry, there's a typo in above post. I mean with c_webmail, c_calendar and c_activesync all set to y, webmail / calendar / activesync are still DISABLED with the error message.

zhb

zhb

2021-09-13 02:27

reporter   ~0015444

By the way, using integer value causes error too. Seems SOGo doesn't support integer value in ModulesConstraints.

francis

francis

2021-09-13 13:48

administrator   ~0015447

In sogo.conf, specify constraints on webmail, calendar and activesync. The c_ prefix is removed from the columns names when fetching the table row.

zhb

zhb

2021-09-13 14:37

reporter   ~0015448

Dear Francis,

Thanks for your reply, but the reply is confusing.

Anyway, i switched column type to VARCHAR(1) (with value y and n) and re-created the SQL VIEW in sogo database, now it works.
I'm not sure why SOGo doesn't work with CHAR(1) in PostgreSQL.

francis

francis

2021-09-13 21:09

administrator   ~0015449

You're confusing too. You first mentioned that varchar wasn't working and now it suddenly start working .. ?

As I wrote, remove the c_ prefix in your ModulesConstraints should have solve the issue.

Issue History

Date Modified Username Field Change
2021-09-13 01:57 zhb New Issue
2021-09-13 01:59 zhb Note Added: 0015443
2021-09-13 02:27 zhb Note Added: 0015444
2021-09-13 13:48 francis Assigned To => francis
2021-09-13 13:48 francis Status new => resolved
2021-09-13 13:48 francis Resolution open => no change required
2021-09-13 13:48 francis Note Added: 0015447
2021-09-13 14:37 zhb Status resolved => feedback
2021-09-13 14:37 zhb Resolution no change required => reopened
2021-09-13 14:37 zhb Note Added: 0015448
2021-09-13 21:09 francis Status feedback => resolved
2021-09-13 21:09 francis Resolution reopened => no change required
2021-09-13 21:09 francis Note Added: 0015449