Re: help: now() + N is now failing! - Mailing list pgsql-novice

From Mendola Gaetano
Subject Re: help: now() + N is now failing!
Date
Msg-id 011d01c35632$11c347f0$10d4a8c0@mm.eutelsat.org
Whole thread Raw
In response to help: now() + N is now failing!  ("Mel Jamero" <mel@gmanmi.tv>)
List pgsql-novice
"Tom Lane" <tgl@sss.pgh.pa.us> wrote:


> One of the problems people have with using C++ that way is that the
> compiler tends to pick unexpected interpretations --- which is exactly
> the problem I'm complaining about for Postgres.  Ask anyone who's worked
> on large systems in C++, they'll have some horror stories to tell you...

I agree partialy with you, implicit cast save you a lot of work and people
that had horror stories are people that are not using the "explicit" keyword
in the constructor.
May be is a good idea to permit this kind of hint in the
function declaration for postgres:

create function foo( explicit timestamptz, int );

so either if the  cast text->timestamptz exist you can not
call

select foo( text, int ).




Regards
Gaetano Mendola



pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: help: now() + N is now failing!
Next
From: Cath Lawrence
Date:
Subject: designing tables for blobs - what are the guidelines?