On Tue, Jan 01, 2008 at 04:29:47PM -0500, Tom Lane wrote:
> 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.

It also improves code readability is is always a good thing.

I've just gone though the code and sent a patch to the tinyerp-devel
list with these fixes in.  Lets see if it gets incorporated.


  Sam

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to