The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

cmotell (5) [Avatar] Offline
First, I'm glad I have you're book.

The syntax explanation of

UPDATE ch01.fastfoods
SET geom =
ST_Transform(ST_GeomFromText('POINT(' || lon || ' ' || lat || ')',4326), 2163);

Seems so strange to. I can see what its doing, but are the "||" delimiters.
I guess we will learn later what the "or" syntax means.

regina.leo (265) [Avatar] Offline
Re: ST_GeomFromText syntax

Sorry I guess we took it for granted people would know what that is and didn't explain, forgetting that not all databases use that operator and that it means something entirely different in some programming languages.

|| is the glue operator in PostgreSQL, and I beleive its the ANSI standard glue operator as well.


'a' || 'b' -> 'ab'

In MySQL same as CONCAT, SQL Server its +. I think Oracle has it as || too.

Gashakamba (1) [Avatar] Offline
Re: ST_GeomFromText syntax
Hello Regina,
Though this post is just too old, I nevertheless had to reply to it just to let you know that I am reading your book and it amazing. It opened my eyes on the endless possibilities I was not tapping into while using PostgreSQL.
Thank a bunch times!