Re: [GENERAL] CREATE TABLE AS does not support IF NOT EXISTS?

2012-02-12 Thread David Waddy
Thank-you, mystery solved! I was reading the "CREATE TABLE" docs and not the "CREATE TABLE AS" docs. My mistake. David Waddy On Sun, Feb 12, 2012 at 3:50 PM, Adrian Klaver wrote: > On Sunday, February 12, 2012 11:42:37 am David Waddy wrote: > > This

[GENERAL] CREATE TABLE AS does not support IF NOT EXISTS?

2012-02-12 Thread David Waddy
This works: CREATE TEMP TABLE temp_medical_summary AS (SELECT * from bov.medical_summary) This gives an error: CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from bov.medical_summary) It would seem that CREATE TABLE AS does not support IF NOT EXISTS. Is this true? David Waddy

Re: [GENERAL] How to return latest results without a polygon intersect?

2012-01-15 Thread David Waddy
Thank-you for the help. I defined the problem a little better and took your advice and asked in postgis users: http://www.postgis.org/pipermail/postgis-users/2012-January/032056.html Dave On Wed, Jan 11, 2012 at 11:20 PM, Andy Colson wrote: > On 01/11/2012 07:14 PM, David Waddy wr

[GENERAL] How to return latest results without a polygon intersect?

2012-01-11 Thread David Waddy
If I have a table of the following form: id (integer) event_time (timestamp) lat_lon (polygon) 3497 1977-01-01 00:00:00 ((-64.997,45.975),(,(-64.9981,45.975),(-64.8981,45.875),(-64.9978,45.9751)) 3431 2007-06-06 01:00:00 ((-64.971,45.982),(-64.921,45.982),(-64.972,45.982),(-64.973,45.98209),(

[GENERAL] Creating a view: ERROR: rules on SELECT must have action INSTEAD SELECT

2010-03-19 Thread David Waddy
I get the following error when trying to create a view with the following trivial example. SQL error: ERROR: rules on SELECT must have action INSTEAD SELECT In statement: CREATE VIEW "nutrition"."test_view" AS SELECT 2 as two, 3 as three INTO TEMP temp_table; SELECT *,two+three as five FROM temp