Re: PGPLSql Select Into problem. - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: PGPLSql Select Into problem.
Date
Msg-id 20070609122719.GA31003@winnie.fuhr.org
Whole thread Raw
In response to Re: PGPLSql Select Into problem.  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: PGPLSql Select Into problem.  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: PGPLSql Select Into problem.  ("Gary Townsend" <garyt@spatialmapping.com>)
List pgsql-novice
On Sat, Jun 09, 2007 at 10:48:49AM +0200, A. Kretschmer wrote:
> am  Fri, dem 08.06.2007, um  9:46:14 -0700 mailte Gary Townsend folgendes:
> >             GeomFromText(
> >             ''POINT('' || stopeasting || '' '' stopnorthing || '')'',
> > projection
>
> If you want to call dynamicaly created sql-statements you need to use
> EXECUTE.
> http://www.postgresql.org/docs/current/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

This isn't a dynamic SQL statement.  POINT isn't a function; it's
part of the text representation of a geometry object that PostGIS
uses.  The error here is a missing || operator before stopnorthing.
The string concatenation could also be replaced with a call to
makepoint().

--
Michael Fuhr

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: PGPLSql Select Into problem.
Next
From: "A. Kretschmer"
Date:
Subject: Re: PGPLSql Select Into problem.