Hi Stuart,

Im afraid Im still stuck with this. I have installed some system
updates a few weeks ago by apt-get, but nothing that I could think of
causing this.

I looked into item data and found data that looks ok to me:
   3288 |            4 | t          | f         | 2008-11-13
16:40:55.408+02 |                18
    3246 |            4 | t          | f         | 2008-11-13
16:37:36.596+02 |                18
    3289 |            4 | t          | f         | 2008-11-13
16:40:55.518+02 |                18
    3410 |            3 | t          | f         | 2008-12-10
14:23:03.80+02  |                36


For some reason the query doesnt work with the year+timestamp data. Any ideas?

-Mika

2008/12/8 Stuart Lewis <[EMAIL PROTECTED]>:
> Weird - that should work fine.
>
> I presume this has just started to happen? If so, have you upgraded your
> database recently, or changed anything on your server such as time zone etc?
>
>
> On 08/12/2008 13:46, "mikan.d.dspace listmail" <[EMAIL PROTECTED]>
> wrote:
>
>> Im getting the following:
>>
>> tds=# SELECT COUNT(*) AS num FROM item WHERE in_archive = true AND withdrawn 
>> =
>> tds-# false  AND item_id IN (SELECT item_id FROM metadatavalue WHERE
>> tds(# metadata_field_id = (SELECT metadata_field_id FROM 
>> metadatafieldregistry
>> tds(# WHERE element = 'date' AND qualifier = 'accessioned')  AND
>> tds(# text_value::timestamp > '2008-12-01'::timestamp AND
>> text_value::timestamp <
>> tds(# '2008-12-31'::timestamp);
>> ERROR:  invalid input syntax for type timestamp: "2008"
>>
>>
>> -Mika
>>
>>
>> 2008/12/8 Stuart Lewis <[EMAIL PROTECTED]>:
>>> Hi Mika,
>>>
>>>> 2008-12-08 14:10:56,445 INFO  org.dspace.core.ConfigurationManager @
>>>> Loading: /home/dspace/tds/dspace/config/log4j.properties
>>>> 2008-12-08 14:10:57,681 DEBUG org.dspace.storage.rdbms.DatabaseManager
>>>> @ Running query "SELECT COUNT(*) AS num FROM item WHERE in_archive =
>>>> true AND withdrawn = false  AND item_id IN ( SELECT item_id FROM
>>>> metadatavalue WHERE metadata_field_id = ( SELECT metadata_field_id
>>>> FROM metadatafieldregistry  WHERE element = 'date'  AND qualifier =
>>>> 'accessioned')  AND text_value::timestamp > '2008-12-01'::timestamp
>>>> AND text_value::timestamp < '2008-12-31'::timestamp ) "  with
>>>> parameters:
>>>>
>>>> Any ideas?
>>>
>>> Try running that query directly in Postgres, and see if it works. It should
>>> work fine, and return a number. If it doesn't work, then we'll need to know
>>> the error message. If it does work, then I'll be puzzled as that is the
>>> query that DSpace is running.
>>>
>>> SELECT COUNT(*) AS num FROM item WHERE in_archive = true AND withdrawn =
>>> false  AND item_id IN (SELECT item_id FROM metadatavalue WHERE
>>> metadata_field_id = (SELECT metadata_field_id FROM metadatafieldregistry
>>> WHERE element = 'date' AND qualifier = 'accessioned')  AND
>>> text_value::timestamp > '2008-12-01'::timestamp AND text_value::timestamp <
>>> '2008-12-31'::timestamp);
>>>
>>> Thanks,
>>>
>>>
>>> Stuart
>>> _________________________________________________________________
>>>
>>> Gwasanaethau Gwybodaeth                      Information Services
>>> Prifysgol Aberystwyth                      Aberystwyth University
>>>
>>>            E-bost / E-mail: [EMAIL PROTECTED]
>>>                 Ffon / Tel: (01970) 622860
>>> _________________________________________________________________
>>>
>>>
>
>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to