Forum OpenACS Q&A: Re: cr_delete_scheduled_files causing errors

Collapse
Posted by Dan Wickstrom on
It appears that somebody reformatted the query and changed it's meaning. It used to be:


       select distinct crftd.path, crftd.storage_area_key
         from cr_files_to_delete crftd
         where not exists (select 1 from cr_revisions r where r.content = crftd.path)


and now it looks like:


  SELECT distinct crftd.path as storage_area_key
    FROM cr_files_to_delete crftd
   WHERE not exists (SELECT 1
                       FROM cr_revisions r
                      WHERE r.content = crftd.path)



I'll go ahead and change it back.

Collapse
Posted by Jarkko Laine on
Thanks, Dan

In oracle version (acs-content-repository-procs-oracle.xql) it seems to be something in between 😊 :

select distinct crftd.path storage_area_key
          from cr_files_to_delete crftd
           where not exists (select 1
                             from cr_revisions r
                            where r.filename = crftd.path)
BTW, is your change just in HEAD or also in the 4-6 branch?
Collapse
Posted by Dan Wickstrom on
No it's the same mistake on the oracle side.  Oracle doesn't require the 'as' keyword when declaring an alias.  I'll go ahead and fix that one too.
Collapse
Posted by tammy m on
Did this make it into CVS? Because I am getting the same error on OACS 4.6.1 release.