[postgis-users] AddGeometryColumn error

Chris Hermansen chris.hermansen at timberline.ca
Wed Aug 27 11:12:24 PDT 2008


¡Hola Javier!

Maybe you did not create your database properly...

from http://www.postgis.org/documentation/

createlang plpgsql postgres
psql -d postgres -f lwpostgis.sql
psql -d postgres -f spatial_ref_sys.sql

the two scripts could be in a number of places on your system: if you
built postgis from source, in your build directory, or maybe in
/usr/share/postgresql/8.3/contrib, or... you might have to look around a
bit :-)

javier.estevez.ext at juntadeandalucia.es wrote:
> I tried one thing:
>
> I create a new table in the database including PostGIS functions. This query
> is CORRECT now:
>
> SELECT addgeometrycolumn('public','tablenew','the_geom',23030,'POINT',2)
>
> The problem right now is... How can I import the PostGIS functions into my
> DATABASE??????
>
>   
>> The function is there and executing, however it is complaining that it
>> cannot find the table name in the public schema.
>>
>> What was your original table create statement for the "estac_aemet"
>> table? "CREATE TABLE public.estac_aemet (field type, etc... "
>> Did you use special accent characters in its creation?
>>
>>
>>     
>>> -----Original Message-----
>>> From: postgis-users-bounces at postgis.refractions.net
>>> [mailto:postgis-users-bounces at postgis.refractions.net] On
>>> Behalf Of javier.estevez.ext at juntadeandalucia.es
>>> Sent: Wednesday, August 27, 2008 8:13 AM
>>> To: PostGIS Users Discussion
>>> Cc: PostGIS Users Discussion
>>> Subject: Re: [postgis-users] AddGeometryColumn error
>>>
>>>
>>> Correctly, I have 3 databases: postgres (This my DB),
>>> demo_postgis and template_postgis
>>>
>>> In my DB there is no FUNCTIONS
>>> In template_postgis there are all the POSTGIS functions.
>>>
>>> Can I import from 'my DB' all PostGIS functions that are in other DB
>>> (template_postgis)
>>>
>>> Thanks.
>>>
>>>       
>>>> Hi,
>>>>
>>>> maybe your instalation of postgis functions and etc are not in
>>>> postgres db. If you are using windwos search for others databases,
>>>> maybe a postgis or postgis_template. At that databases you
>>>>         
>>> will find
>>>       
>>>> the the functions.
>>>>
>>>> If you are using linux then you will have to add that functions to
>>>> some database, see the docs for a how-to.
>>>>
>>>> A good policy is to create a new database using a template with the
>>>> postgis stuff. Leave the postgres db for maintenance.
>>>>
>>>> Best regards,
>>>>
>>>> 2008/8/27 <javier.estevez.ext at juntadeandalucia.es>
>>>>
>>>>         
>>>>> No, is correct like 'estac_aemet'
>>>>>
>>>>> How do I know if my POSTGIS functions are installed ok?
>>>>>
>>>>> In my DB called 'postgres' I have no Functions.
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>>>> Yes, the tabla estac_aemet exists. The schema is public
>>>>>>>
>>>>>>>               
>>>>>> Did you create the table using double quotes to name it ?
>>>>>> "ESTAC_AEMET"
>>>>>>             
>>>>> maybe
>>>>>           
>>>>>> ?
>>>>>> If so, then you have to respect the case in the table name when
>>>>>> naming
>>>>>>             
>>>>> it:
>>>>>           
>>>>>> SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom',
>>>>>>             
>>>>> 23030,'POINT',2)
>>>>>           
>>>>>> You can check the table name by launching psql and typing \d to
>>>>>> list all tables.
>>>>>>
>>>>>>
>>>>>> Nicolas
>>>>>> _______________________________________________
>>>>>> postgis-users mailing list postgis-users at postgis.refractions.net
>>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>>
>>>>>>             
>>>>> _______________________________________________
>>>>> postgis-users mailing list postgis-users at postgis.refractions.net
>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>
>>>>>           
>>>>
>>>> --
>>>> Luigi Castro Cardeles
>>>>         
>>> _______________________________________________
>>>       
>>>> postgis-users mailing list
>>>> postgis-users at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>
>>>>         
>>> _______________________________________________
>>> postgis-users mailing list postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>       
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>     
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   


-- 
Regards,

Chris Hermansen         mailto:chris.hermansen at timberline.ca
tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.232.0644
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue  · Vancouver BC · Canada · V5Z 1E5




More information about the postgis-users mailing list