Search Postgresql Archives

Re: Trying to create implicit casts to text in PG 8.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 13, 2009 at 05:43:52PM +0100, Aleksander Kmetec wrote:
> I added both "||(double precision, text)" and "||(text, double 
> precision)" operators and it works now.
> 
> But I'm wondering: do I need to do anything else besides creating implicit 
> casts and adding missing operators? And will this introduce any side 
> effects which are not compatible with 8.2 and might break my queries in 
> unpredictable ways?

You'll get less errors from PG because you've told it to convert things
automatically for you.  I'd be tempted to not do this and change the
code to make these conversion explicit as there will be cases (maybe
when you're writing code in the future) when you want to get an error
and not have PG do something unexpected.

In the end, any type system is just a tool.  It's main job is to find
bugs in code by spotting a common class of error (it also allows other
optimizations, but that's normally less important).  I tend to find it
serves a useful purpose and the errors it gives are indications for me
to be more explicit with my code.  If you find it's too strict you're free
to disable it by adding in extra casts/functions/operators.


  Sam

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux