Re: text -> time cast problem
От | Christopher Kings-Lynne |
---|---|
Тема | Re: text -> time cast problem |
Дата | |
Msg-id | GNELIHDDFBOCMGBFGEFOIELACAAA.chriskl@familyhealth.com.au обсуждение исходный текст |
Ответ на | Re: text -> time cast problem (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Just a quick question for 7.1.3: I notice that where as you can do this: insert into table values ('now'); To insert a current timestamp, if you try using the more standard syntax: insert into table values ('CURRENT_TIMESTAMP'); You get the word 'current' inserted. However if you do this: insert into table values (CURRENT_TIMESTAMP); It works as expected. Is there anything wrong with any of these behaviours, and has any of it been changed for 7.2? I kind think that the quoted CURRENT_TIMESTAMP should work just like the unquoted... Chris > -----Original Message----- > From: pgsql-hackers-owner@postgresql.org > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Tom Lane > Sent: Friday, 7 December 2001 10:21 PM > To: Brent Verner > Cc: Peter Eisentraut; PostgreSQL Development; Thomas Lockhart > Subject: Re: [HACKERS] text -> time cast problem > > > Brent Verner <brent@rcfile.org> writes: > > This seems fair. Would this approach imply that CURRENT_TIME and > > CURRENT_TIMESTAMP should not apply default precision to their return > > values? Right now, "CURRENT_TIME" is equivalent to "CURRENT_TIME(0)" > > and "CURRENT_TIMESTAMP" eq to "CURRENT_TIMESTAMP(6)". > > Yes, I had been thinking that myself, but hadn't got round to mentioning > it to the list yet. (Even if you do accept default precisions for time > & timestamp columns, I can see nothing in the spec that justifies > applying those default precisions to CURRENT_TIME/TIMESTAMP. AFAICS, > the precision of their results when they are given no argument is > just plain not specified.) > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
В списке pgsql-hackers по дате отправления: