[GRASS-dev] Re: [GRASS-user] Views in pgSQL

Moritz Lennert mlennert at club.worldonline.be
Thu Apr 12 10:59:42 EDT 2007


On 11/04/07 18:15, Moritz Lennert wrote:
> On 11/04/07 17:37, Markus Neteler wrote:
>> On Wed, Apr 11, 2007 at 05:25:24PM +0200, Moritz Lennert wrote:
>>> On 11/04/07 13:48, Jaros??aw Jasiewicz wrote:

>>>> BTW:
>>>> Pg Views are very important for me when I connect-reconnect vector 
>>>> files to different atribute table. I use (used!) views insted of 
>>>> original table to avoid occasional removing original data and to 
>>>> speed up transfer limiting data in views only to these needed for
>>>> (sorry, I think everybody knows it)
>>> I completely agree with you. Being able to connect maps to views is 
>>> fundamental in my eyes.
>>
>> Yes. But we need a reasonable implementation.
>> Anyone with suggestions how to implement it?
> 
> For me the choice is either
> 
> 1) to consider views as tables (and thus change the way the individual 
> drivers list tables) or
> 
> 2) to treat them as separate and change v.db.connect so that it checks 
> for both.
> 
> 1) seems much easier to implement, 2) seems cleaner in case we need to 
> list tables only, not views, in other contexts than v.db.connect.
> 

As I don't see any reason why 1) should be a problem in the context of 
GRASS, I've had done a quick implementation of this for the pg driver 
(diff attached). For me it seems to work.

Anyone opposed to committing this ?

For sqlite and mysql, I will have to do some more reading to learn how 
to get the relevant info (i.e. list of user-relevant views). If someone 
has some knowledge about this, I would be grateful.

Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: listtab.diff
Type: text/x-patch
Size: 3551 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070412/cb72a179/listtab.bin


More information about the grass-dev mailing list