Re: Cast of numeric()

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cast of numeric()
Date: 2000-05-15 13:56:00
Message-ID: 392001F0.F9758AE2@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> OK, this is making me rethink my suggestion in the book of using type()
> to do typecasts. Seems I should recommend CAST (val AS type), as wordy
> as it is, or maybe val::type?

CAST(val AS type) is defined in SQL92. istm that the others are
available at the whim of our current implementation, since when push
comes to shove we might have to choose between having one of our
non-standard mechanisms or having some other new features.

An example is SQL3 enumerated types, which use the double-colon
notation, but with value and type reversed from our syntax :(

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-15 14:11:04 Re: AW: type conversion discussion
Previous Message Bruce Momjian 2000-05-15 13:52:04 Re: Cast of numeric()