I have a sql script that creates several tables, a trigger, and a trigger function. All the commands work in pgAdmin when I execute them in the "Query" section. My goal is to put all these commands in a script so that I can set up the database on any machine relatively easily and quickly. When I attempt to run the script through psql, however, I get the following errors on all of the lines where I attempt to use
ERROR: type "geography" does not exist
It doesn't make sense because I can copy and paste the exact same queries into the query editor of pgAdmin and it works just fine. Does psql not support PostGIS? Or maybe just not the most recent version of PostGIS, 1.5.3, which includes the new
Geography types? Is there something I can do to fix this?
An example of one of my queries:
CREATE TABLE source_imagery ( id SERIAL PRIMARY KEY, image_type VARCHAR(1000), image_path VARCHAR(1000), boundary GEOGRAPHY(POLYGON, 4326), image_time TIMESTAMP, catalog_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
ERROR: type "geography" does not exist LINE 5: boundary GEOGRAPHY(POLYGON, 4326), ^