[R-sig-DB] dbWriteTable in RPostgreSQL can't handle date and timestamp data types.

Xiaobo Gu gux|@obo1982 @end|ng |rom gm@||@com
Mon Mar 7 15:04:50 CET 2011


On Mon, Mar 7, 2011 at 10:00 PM, Tomoaki NISHIYAMA
<tomoakin using kenroku.kanazawa-u.ac.jp> wrote:
> Hi,
>
>> Can we specify data types for columns of the table created by
>> dbWriteTable,
>
> You can do anything by issuing an SQL.
Manually issue SQL is not so convenient

>> most times we want timestamp without timezone
>
> The reason/benefit is not explained.
>
>> want it to be decimal with scales,
>
>
> What do you mean with "decimal with scales"?

> What is the difference with float?

Please seee http://www.postgresql.org/docs/9.0/interactive/datatype-numeric.html#DATATYPE-FLOAT.

> --
> Tomoaki NISHIYAMA
>
> Advanced Science Research Center,
> Kanazawa University,
> 13-1 Takara-machi,
> Kanazawa, 920-0934, Japan
>
>
> On 2011/03/07, at 21:32, Xiaobo Gu wrote:
>
>> Can we specify data types for columns of the table created by
>> dbWriteTable, most times we want timestamp without timezone.
>> Another case is numeric numbers, in current implement all numeric data
>> are converted as float, but for some applications want it to be
>> decimal with scales,
>>
>> Xiaobo Gu
>>
>>
>> On Mon, Mar 7, 2011 at 6:37 PM, Tomoaki NISHIYAMA
>> <tomoakin using kenroku.kanazawa-u.ac.jp> wrote:
>>>
>>> Hi,
>>>
>>>>> class(df[["c"]])
>>>>
>>>> [1] "Date"
>>>>>
>>>>> class(df[["d"]])
>>>>
>>>> [1] "POSIXct" "POSIXt"
>>>
>>>
>>> Ok, if you know the class name, the change is simple as r179.
>>> (r178, r180 are cleanups of other part)
>>> --
>>> Tomoaki NISHIYAMA
>>>
>>> Advanced Science Research Center,
>>> Kanazawa University,
>>> 13-1 Takara-machi,
>>> Kanazawa, 920-0934, Japan
>>>
>>>
>>
>
>




More information about the R-sig-DB mailing list