Re: ogrinfo vs gdal vector info equivalent command

Even Rouault via gdal-dev <[email protected]>
Newsgroups gmane.comp.gis.gdal.devel
Message-ID <[email protected]>
Scott,

you don't want info, you want to run a sql command. So gdal vector sql 
!  And as you perform modifications, you need to provide explicit --update

gdal vector sql --update --sql "create index mytable_col_idx on 
mytable(col)" source.gpkg

Even

Le 02/04/2026 à 02:58, Scott via gdal-dev a écrit :
> Greetings!
>
> What is the equivalent 'gdal vector info' (or other CLI) command to 
> the older ogrinfo syntax?
>
> ogrinfo -dialect sqlite -sql "create index if not exists 
> mytable_col_idx on mytable(col)" source.gpkg
>
> The above works fine, the following errors out:
>
> gdal vector info --dialect sqlite --sql "create index mytable_col_idx 
> on mytable(col)" source.gpkg
>
> ERROR 1: In ExecuteSQL(): sqlite3_step(create index mytable_col_idx on 
> mytable(col)):
>   attempt to write a readonly database
>
>
> I'm struggling with this and have continued to use the old ogrinfo.
>
> Thanks!
> Scott
>
-- 
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.