Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id F337C2E0092 for ; Mon, 28 Apr 2008 05:01:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35370-04 for ; Mon, 28 Apr 2008 05:01:52 -0300 (ADT) X-Greylist: delayed 00:06:19.657065 by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by developer.postgresql.org (Postfix) with ESMTP id 0FD4C2E008F for ; Mon, 28 Apr 2008 05:01:51 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id n7so7878274wag.5 for ; Mon, 28 Apr 2008 01:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=+QZm8LaDWgcKST72bUQ4EjeLd7iQjEf7K4bH6EP6too=; b=tyycsaHiUGLvg1v0wmWKy3/Tmz0HEcpixyVskRZ+fmESREYxlpu6tzTC24h075oG9gdy+TFQVqq1ehrtSg+KVF+C4/YfHHSN2J6ZWF44NbbzyrZ78GHg1v3nGVc7ku26eXWSl3HjxaR4/jQMqhopa0l+U2ZSyD9bR2Gi2Sp+7Jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WJMPXqRtR89q3zVNKUp1RrezBmeEkOV/ZpsfPvkAUg6f+2buv6UyUHSoMQJnRfZCo07kPDYP5PTQCM3XIegxPGTOKzRd3cbbENm/FGjsbwD3mGBptI3EnJ4b/QphwFrpL9bj+naHAtfVX17HNhuy0agXcv3Uag44qGAEnuxAnFE= Received: by 10.114.160.1 with SMTP id i1mr6095986wae.49.1209369330441; Mon, 28 Apr 2008 00:55:30 -0700 (PDT) Received: by 10.114.80.14 with HTTP; Mon, 28 Apr 2008 00:55:30 -0700 (PDT) Message-ID: <5a9699850804280055v136de9b2tfbd4bd6e3d1c1257@mail.gmail.com> Date: Mon, 28 Apr 2008 09:55:30 +0200 From: "Brian Modra" To: "J Fran" Subject: Re: Problem with GeomFromText('POINT(... Cc: "Lista Correo PostgreSQL" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200804/269 X-Sequence-Number: 29033 The "long" column isn't being referenced the way you've written this, because its inside of a quoted string. You need to construct the string GeomFromText('POINT(' || public.Contenedor.long || ' 49.8543)', 4326) 2008/4/28 J Fran : > > I'm trying upate a group of records. In the table I have 1 field geometry > and 2 fields ineteger with long. and lat. everyone. I try to update the > field geometry with point(long lat). > > I use this update with numbers and this is ok. > > UPDATE > public."Contenedor" > SET > ubicacion = GeomFromText('POINT(1.9845 49.8543)', 4326) > > but when i change the number by a field this is not ok. : > > UPDATE > public."Contenedor" > SET > ubicacion = GeomFromText('POINT(public.Contenedor.long 49.8543)', 4326) > > > I have this error. > > ERROR: parse error - invalid geometry > Estado SQL:XX000 > Contexto:SQL function "geomfromtext" statement 1 > > Everyone can tell ma some solution please. > > Thank you. > > > > > ________________________________ > Discover the new Windows Vista Learn more! -- Brian Modra Land line: +27 23 5411 462 Mobile: +27 79 183 8059 5 Jan Louw Str, Prince Albert, 6930 Postal: P.O. Box 2, Prince Albert 6930 South Africa