Hi Piotr,

you can try:

1)
CREATE SEQUENCE my_seq START 1

2)
CREATE VIEW my_view AS
SELECT nextval('my_seq'), otherfield, ...
FROM mytable1, mytable2


HTH,
Fred





2009/5/29 Piotr Synowiec <[email protected]>

> Kevin Neufeld wrote:
>
>> Piotr Synowiec wrote:
>>  > Is there any particular reason why AddGeoemtryColumn doesn't work on
>>
>>> Views ?
>>>
>>>
>> AddGeometryColumn adds a column to a table and registers the column with
>> the geometry_columns.  If you want to add a geometry column to your VIEW,
>> alter your VIEW to select the column from an appropriate underlying table.
>>
> I have done it
>
>>
>> You're right that you will have to manually add or register the view with
>> geometry_columns for some applications to detect the view.
>>
> maybe I expressed myself not clearly.
> The thing is that AddGeometryColumn function complains that View is not a
> Table and it will not add geometry column to
> geometry_columns table
>
> It works after I insert data with INSERT
>
> Just didn't figure it out how to add unique ID field to my VIEW.
> The ID I have in my tables merged to the VIEW have repeating IDs
>
> Piotr
>
> _______________________________________________
> 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