Search Postgresql Archives

Re: Selecting strict, immutable text for a composite type.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steven Lembark <lembark@xxxxxxxxxxx> 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux