Larry Rosenman wrote:
> 
> I want to basically make the whole hierarchy under the MAIL-ARCHIVE/yyyy/mm,
> I.E.
> MAIL-ARCHIVE/2006/11/lists/pgsql/hackers
>>From when it was ~/Mail/lists/pgsql/hackers
> 
> (and, yes, this would be on PostgreSQL).

That's even easier:

update dbmail_mailboxes
 set name= regexp_replace(name,'^','MAIL-ARCHIVE/' ||
  to_char(current_timestamp,'YYYY/mm/'))
 where name not like 'MAIL-ARCHIVE%'
 and owner_idnr=(
  select user_idnr from dbmail_users where userid='testuser1'
 );



-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to