Re: [BUGS] 'Default' troubles again. This time with time :)))
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Leon <leon@udmnet.ru>
Cc: bughunters <pgsql-bugs@postgreSQL.org>
Date: 1999-07-18T20:11:10Z
Lists: pgsql-bugs
Leon <leon@udmnet.ru> writes: > Tom! I tested your method of creating table with > create table ww (aa int4, bb timestamp default text 'now'), > and it didn't work either! (BTW, this is exactly the way docs suggest > doing it.) See? I promised to deliver a real bug and I did it! :))) By golly, you're right. It works as advertised for a DATETIME field, which is the case I'd been testing. But for a TIMESTAMP field the constant gets pre-coerced anyway :-(. Wonder why ... will look into it, since I'm busy hacking on that part of the system now. > Yes, docs mumble something about 'cacheable' and 'non-cacheable' > functions, but it is not clear to me how Postgres discerns them. The proiscachable field in table pg_proc is presumably supposed to tell this. Doesn't look like it's set in an intelligent manner for most of the built-in functions though. I don't think it has anything to do with the bug for TIMESTAMP... regards, tom lane