Re: array syntax and geometric type syntax - Mailing list pgsql-general

From Dan Halbert
Subject Re: array syntax and geometric type syntax
Date
Msg-id 1250181089.741124560@192.168.1.35
Whole thread Raw
In response to Re: array syntax and geometric type syntax  (Sam Mason <sam@samason.me.uk>)
Responses Re: array syntax and geometric type syntax
List pgsql-general
From "Sam Mason" <sam@samason.me.uk>:
>The nicer syntax to distinguish things is to use:
>
>  TYPENAME 'literal'

Thanks! That is very helpful. I saw that syntax in one example I found on the web, and incorrectly thought it was an
alternateway of writing the function call. 

The point of all this was to figure out a uniform syntax I can use for doing some type adapters to convert back and
forthbetween Python objects and PG objects (through psycopg2 or some other Python-PG interface). Perhaps I should have
mentionedthat initially. I now see that the '{...}' notation does not do any evaluation of what's inside, e.g. 

  SELECT '{1,2,1+2}'::INT[];

doesn't work, but

  SELECT ARRAY[1,2,1+2]::INT[];

works fine.

Dan



pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: comparing NEW and OLD (any good this way?)
Next
From: Philip Rhoades
Date:
Subject: Re: PostgreSQL for Firefox Bookmarks?