type coersion - Mailing list pgsql-hackers

From Bruce Momjian
Subject type coersion
Date
Msg-id 199808080642.CAA10950@candle.pha.pa.us
Whole thread Raw
List pgsql-hackers
Let me ask about type coersion.

When you have an int2 column called x, how do you place the conversion
functions when it is being compared to an in4 constant?

    x = int2(500)

    int4(x) = 500

The first is good for indexing, the second is not.  If they are both
variables or both constants, the handling does not matter.


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] OR clause status
Next
From: dg@informix.com (David Gould)
Date:
Subject: re: Informix on Linux