Hello! Sorry for the later answer.

On Thu, Apr 07, 2011 at 01:53:14PM +0200, Gregor Horvath wrote:
> it doesn't seem to be possible to define an index like this:
> 
>  CREATE INDEX location_trgm_idx ON location USING gist (address
>  gist_trgm_ops);
> 
> http://www.postgresql.org/docs/current/static/pgtrgm.html
> 
> After a quick look at index.py it should be possible to patch it to
> accept a new parameter for example "using" and insert it into the sql
> creation in: 
> 
> def sqliteCreateIndexSQL(self, soClass):
>       [...]
>         ret = 'CREATE %s %s_%s ON %s (%s)' % \
>               (uniqueOrIndex,
>                self.soClass.sqlmeta.table,
>                self.name,
>                self.soClass.sqlmeta.table,
>                ', '.join(spec))
>         return ret        
> 
> should get something like:
>  
> def sqliteCreateIndexSQL(self, soClass):
>       [...]
>         ret = 'CREATE %s %s_%s ON %s %s (%s)' % \
>               (uniqueOrIndex,
>                self.soClass.sqlmeta.table,
>                self.name,
>                self.soClass.sqlmeta.table,
>              self.using,
>                ', '.join(spec)
>              )
>         return ret        
> 
> I don't know if this is a postgresql specific thing or not and should
> therefore only be inserted for postgresql.

   We can afford to put the burden of not defining self.using upon the
user. At least for beginning.

> Is such a patch welcomed?

   Certainly. Thank you in advance!

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to