Re: PGPLSql Select Into problem.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: PGPLSql Select Into problem.
Date: 2007-06-09 12:27:19
Message-ID: 20070609122719.GA31003@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A. Kretschmer 2007-06-09 14:13:48 Re: PGPLSql Select Into problem.
Previous Message A. Kretschmer 2007-06-09 08:48:49 Re: PGPLSql Select Into problem.