[gdal-dev] ogrinfo vs gdal vector info equivalent command
Even Rouault
even.rouault at spatialys.com
Wed Apr 1 18:03:27 PDT 2026
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.
More information about the gdal-dev
mailing list