Search Postgresql Archives

Re: array syntax and geometric type syntax

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

 




I am trying to make sense of geometric literal syntax in and out of array syntax. I cannot figure out a general rule: sometimes single quotes work, sometimes double quotes work, and inside and outside of array literals the rules are different an seemingly inconsistent.

Examples of all the weird cases are below. If someone could explain what the SQL parser is really looking for, and what the "best" or "most correct" way is, I would be grateful.

I'm not sure you have a question here that you didn't answer yourself. Postgres is stricter than most dbms's about typing. It doesn't like to guess about what you probably meant. It's both a blessing and a curse. But you get used to it.

You've already gone through what works and what doesn't. Just do what works. :) But to answer the question about why the quotes when it is a point array: Postgres is correctly interpreting and storing your point arrays. But arrays are output as comma separated lists and since your points have embedded commas, it quotes them.

Scott

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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