type coersion

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: type coersion
Date: 1998-08-08 06:42:07
Message-ID: 199808080642.CAA10950@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)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)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-08-08 06:53:04 Re: [HACKERS] OR clause status
Previous Message Bruce Momjian 1998-08-07 19:06:01 Re: [HACKERS] Re: Informix on Linux