SHARE
TWEET

Untitled

a guest Jan 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Latitude      | Longitude
  2. +-----------------------------+
  3.  
  4. 35.0528620000 | -119.375136000
  5. +-------------|---------------+
  6.    
  7. [Err] ERROR:  syntax error at or near "ALTER"
  8. LINE 1: EXPLAIN ALTER TABLE "allwells_CA_copy"
  9.    
  10. ERROR: syntax error at or near "ALTER" LINE 1: ..., VERBOSE off, COSTS on, BUFFERS off, TIMING off )ALTER TABL... ^ ********** Error ********** ERROR: syntax error at or near "ALTER" SQL state: 42601 Character: 71
  11.    
  12. ALTER TABLE mytable
  13.   ALTER COLUMN "Longitude" TYPE NUMERIC(14, 11)
  14.     USING ("Longditude"::NUMERIC(14,11)),
  15.   ALTER COLUMN "Latitude" TYPE NUMERIC(14, 11)
  16.     USING ("Latitude"::NUMERIC(14,11));
  17.    
  18. CREATE EXTENSION postgis;
  19. BEGIN;
  20.   ALTER TABLE foo ADD COLUMN geog geography;
  21.   UPDATE foo SET geog = ST_MakePoint(long, lat);
  22.   CREATE INDEX on foo USING gist ( geog );
  23.   ALTER TABLE foo DROP COLUMN long, DROP COLUMN lat;
  24. COMMIT;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top