Martin Hart <[EMAIL PROTECTED]> writes:
> db=# select '(1,2)'::point::text;
> ERROR:  cannot cast type point to text

> the only way i have been able to achieve it is to write a plpgsql function:
> while this appears to work fine - I am wondering if I am missing something 
> fundamental - specifically whether or not there is an inbuilt way to do it 
> (which I guess there must be for the plpgsql function to work)?

plpgsql is effectively doing

regression=# select textin(point_out('(1,2)'::point));
 textin
--------
 (1,2)
(1 row)

There is not a one-step cast function for this.  (Not for any
fundamental reason, just a lack of round tuits.)

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to