Oops, typo : alter table mailboxes add constraint uniq_guid unique (guid);
(removed 'check' which is wrong syntax) On 09/06/2016 16:14, NSS Ltd wrote: > It looks like my earlier patch does address this and also adds the > x-guid to the status command as well. > > I have 2 patch files plus a necessary change to the database tables : > > -- add uuid extension into PostgreSQL database > CREATE EXTENSION "uuid-ossp"; > -- alter mailboxes table to add a guid and set a unique constraint on it > alter table mailboxes add guid uuid not null default uuid_generate_v4(); > alter table mailboxes add constraint uniq_guid check unique (guid); > > This will automatically create a random uuid for each mailbox and > enforce the uniqueness (which should be the default if the uuid > generation is any good). > > I've cleaned up my original patch set and removed some redundant debug > and fragments of other stuff I was testing. This gives 2 patch files as > the code has 2 distinct parts. They apply with some offsets against the > current master : > > Add uuid handling to the PostgreSQL code. uuid.patch. This could stand > by itself, though it's purpose is to lay the proper PostgreSQL handling > of uuid columns. > > Add x-guid handling to STATUS and LIST commands. xguid.patch. This > requires uuid.patch first. > > I have this running on a production server (again). Lots of my users > are using clients which use the x-guid, so this is needed for general > use as far as I can tell. > > Jim > > > > > On 09/06/2016 14:59, NSS Ltd wrote: >> OK, I knew this was familiar. I sent a patch in April 2015 but it's not >> merged (some others I sent for some different things are merged). >> >> I need to check the code to become familiar again, but is it possible to >> get this merged in? It may need some cleanup, but I believe it was >> working on my custom build OK for the last year, so it should be good to >> merge in after review. >> >> Jim >> >> >> >> >> On 09/06/2016 14:29, NSS Ltd wrote: >>> Hi, >>> >>> I've just updated to the latest git master and see a number of back-off >>> due to imap syntax error messages. >>> >>> The offending command seems to be : >>> >>> list "" "*" return (status (x-guid) children) >>> >>> And the 'status' seems to be the problem. >>> >>> 114 BAD Unknown return option: status >>> >>> Before digging into this, is this a known issue/something being worked >>> on? If it's open/new, can you point me to what may be required to >>> resolve (e.g. new code/changes required)? >>> >>> Thanks >>> >>> Jim >>> >>> (There's something familiar about this - I'm not sure if this is the >>> same issue I'd had a few years back.) >>> >>> >>> >>> >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/125 First line: 114 list >>> "" "*" return (status (x-guid) children) >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 IMAP::runCommands, 1 commands >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/125 Execution time 0ms >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/125 Finished >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 IMAP::runCommands, 1 commands >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/125 Retired >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/125 114 BAD Unknown return >>> option: status >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 IMAP::runCommands, 0 commands >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 IMAP::runCommands, 0 commands >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/126 IMAP Command: 115 unselect >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30/126 First line: 115 unselect >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 IMAP::runCommands, 1 commands >>> Jun 9 09:19:19 aox Archiveopteryx: 9236/2/30 Delaying next IMAP command >>> for 12 seconds (because of 12 syntax errors) >>>
