Re: Selecting strict, immutable text for a composite type. - Mailing list pgsql-general

From Tom Lane
Subject Re: Selecting strict, immutable text for a composite type.
Date
Msg-id 20099.1525967568@sss.pgh.pa.us
Whole thread Raw
In response to Selecting strict, immutable text for a composite type.  (Steven Lembark <lembark@wrkhors.com>)
List pgsql-general
Steven Lembark <lembark@wrkhors.com> writes:
> Q: What is the syntax for a strict, immutable function in 
>    SQL that returns text suitable for use with either 
>    creating a "select *" view or a GIST index?

Your example works just fine for me ...

regression=# select lat_lng_text('(42,54.5)');
 lat_lng_text 
--------------
 42-54.5
(1 row)

Maybe you should show a more concrete example of what's not working.

Side comment: I think you need to rethink that text representation,
because it'll be at best ugly with a negative longitude.  Is there a
reason not to just use the default record representation (with parens
and a comma)?

            regards, tom lane


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Enhancement to psql command, feedback.
Next
From: Ben Hood
Date:
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE