GIS_TEST=# SELECT PostGIS_Full_Version(); postgis_full_version ------------------------------------------------------------------------------------- POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS (1 row) GIS_TEST=# SELECT DropGeometryColumn( 'foo', 'the_geom'); dropgeometrycolumn ------------------------------------------ public.foo.the_geom effectively removed. (1 row) GIS_TEST=# DROP TABLE foo; DROP TABLE GIS_TEST=# CREATE TABLE foo ()WITH (OIDS = TRUE); CREATE TABLE GIS_TEST=# SELECT AddGeometryColumn( 'foo', 'the_geom', -1, 'LINESTRING', 2); addgeometrycolumn ----------------------------------------------------- public.foo.the_geom SRID:-1 TYPE:LINESTRING DIMS:2 (1 row) GIS_TEST=# INSERT INTO foo(the_geom) VALUES (ST_GeomFromText('LINESTRING(0 0, 1 3)')); INSERT 1206561 1 GIS_TEST=# GIS_TEST=# select the_geom=ST_SetPoint(the_geom, 0, 'POINT(100000 200000)') from foo; ?column? ---------- t (1 row) GIS_TEST=# select the_geom=ST_Translate(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'), 0, 0) from foo; ?column? ---------- f (1 row) GIS_TEST=# GIS_TEST=# select st_astext(the_geom), st_astext(ST_Envelope(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'))) from foo; st_astext | st_astext ---------------------+-------------------------------- LINESTRING(0 0,1 3) | POLYGON((0 0,0 3,1 3,1 0,0 0)) (1 row) GIS_TEST=# select st_astext(the_geom), st_astext(ST_Envelope(ST_Translate(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'), 0, 0))) from foo; st_astext | st_astext ---------------------+---------------------------------------------------- LINESTRING(0 0,1 3) | POLYGON((1 3,1 200000,100000 200000,100000 3,1 3)) (1 row) GIS_TEST=#