Question about PARTIAL DATE type/s - Mailing list pgsql-general

From r d
Subject Question about PARTIAL DATE type/s
Date
Msg-id CALtFtEK35HqMr34hKyyCTV2g522fpiJK+6qAS6rZVdeTWgWS5g@mail.gmail.com
Whole thread Raw
Responses Re: Question about PARTIAL DATE type/s
List pgsql-general
Hi,

I have text fields which contains dates in the format 'YYYYMM' (four positions for the year, two for the month).
These fields are contained in text files which I load into the DB.

When I convert this field to a date using 

        to_date("PARTIAL_DATE_FIELD",'YYYYMM'); -- (a cast won't recognize the input as valid)

I still get full dates as an output, for example, 
        '198801' ---> 1988-01-01
        '196408' ---> 1964-08-01
and so on, what is wrong in this case because nowhere it is said that I have the /first/ of that month, the entry just says that the event in question happened /during/ that month.


My question:
Is it possible to define fields which contain partial dates per above? I found nothing in the manual.


Thanks,

RD

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Help with query timeout
Next
From: Daniele Varrazzo
Date:
Subject: Re: Question about PARTIAL DATE type/s