From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Tzahi Fadida <Tzahi(dot)ML(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: getting type name |
Date: | 2006-07-10 09:43:02 |
Message-ID: | 20060710094302.GA17723@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 10, 2006 at 02:03:11AM +0300, Tzahi Fadida wrote:
> On Monday 10 July 2006 00:29, Martijn van Oosterhout wrote:
> > On Sun, Jul 09, 2006 at 10:08:42PM +0300, Tzahi Fadida wrote:
> > > They return format_type_be(INT4OID) = "integer" or
> > > format_type_be(FLOAT8OID) = "double precision"
> > > I need to use this in a query with the "::" cast operator.
> >
> > The problem being?
>
> Just if it is a one-to-one conversion, otherwise the same type
> equality functions i use would potentially not work properly.
Well, it is a one-to-one conversion. A float8 == double precision. They
are mapped together very early. Similarly for integer == int4. If you
look in the pg_type table, you'll see there are no entries for
"integer" or "double precision".
The fancy output is mostly for compatability purposes (SQL defines
these names).
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-07-10 09:57:59 | Re: pgsql-patches considered harmful |
Previous Message | Tom Lane | 2006-07-10 04:20:52 | Re: pgsql-patches considered harmful |