Sam Mason <[EMAIL PROTECTED]> writes: > I've just downloaded the source of tinyerp and had a look though and > this practice seems pretty endemic. They should really be using > to_char(date_exp, 'YYYY-MM') > instead of > substring(date_exp FOR 7) > in all their queries.
Or at least explicitly casting the date to text. But your way is better, since it won't break if the datestyle is something other than ISO. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly