Since you are using a non-standard way of naming your table (starting with number), as Oliver was explaining, you need to double quote your table name.

$ set mytab=\"123foo\"

$ echo $mytab
"foo"

$ psql -c "CREATE TABLE $mytab( a int ) " postgis
CREATE TABLE

$ psql -c "\dt" postgis
              List of relations
 Schema |       Name       | Type  |  Owner  
--------+------------------+-------+----------
 public | 123foo           | table | kneufeld
 public | geometry_columns | table | kneufeld
 public | spatial_ref_sys  | table | kneufeld
(3 rows)

$ psql -c "DROP TABLE $mytab" postgis
DROP TABLE


-- Kevin

On 3/28/2010 8:35 AM, Shreerang Patwardhan wrote:
Hi Ollvier,
   I was just writing to you about your previous mail. Well, th e DROP TABLE command is not working at my end. I have used double quotes also. Can you guess what could the problem be? I am trying to use that command in a shell script and it is not working. I have also tried it on the terminal and still the result is the same....ERROR!!!.....
Need help!!!
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to