Re: Cast of numeric()
Re: Cast of numeric()
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
> > 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. OK, I am going to use CAST everywhere, except in one place where I have nested casts, which is just too hard to read, so I will use :: and mention the CAST section. > > 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@alumni.caltech.edu > South Pasadena, California > -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026