[gdal-dev] ogr2ogr -f OCI fails on Windows
Ivan Lucena
lucena_ivan at hotmail.com
Fri May 2 08:59:42 PDT 2014
Hi Martin,
Here is a list of the issues that I am planning to fix on that driver, once I have time, bur if you think they are important for you too we can share the work. The first item you have already started but you might think of adding that line to the session initialization:
1) Always create tables using VARCHAR2
specifications for character strings. Without this, loading into UTF8
databases is not possible. The simplest to achieve this is to execute
this statement when connecting:
ALTER SESSION SET NLS_LENGTH_SEMANTICS=CHAR
2) When loading a shape file without
any attributes, then the -overwrite parameter is ignored. When the
shape file has at least one attribute in the DBF file, then the
-overwrite parameter works fine: the OCI driver first drops the existing
table before re-creating it. Only when the input shape file has no attributes.
3) When reading a view, the name of the view name must be in upper case
4) Add support for LOB attribute columns
5) Create the table with all the column definition at once instead of issuing one ALTER TABLE ADD COLUMN statement for each column
I have started with # 4 but I didn't get very far.
Regards,
Ivan
> Date: Fri, 2 May 2014 10:36:14 +0200
> Subject: Re: [gdal-dev] ogr2ogr -f OCI fails on Windows
> From: landa.martin at gmail.com
> To: lucena_ivan at hotmail.com
> CC: gdal-dev at lists.osgeo.org
>
> Hi,
>
> 2014-04-18 18:55 GMT+02:00 Ivan Lucena <lucena_ivan at hotmail.com>:
> > The driver should create the column as VARCHAR2, not VARCHAR [1]. It is
> > wrong for several reasons [2] and there is a possibility that the amount of
> > data you are loading is too big for the wrong data type. Can you change that
> > code [1], compile and try again?
> >
> > [1] -
> > [http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/oci/ogrociwritablelayer.cpp#L296]
> >
> > [2] """
> > The VARCHAR2 subtypes STRING and VARCHAR have the same range of values as
> > their base type. For example, VARCHAR is just another name for VARCHAR2.
> >
> > You can use the VARCHAR2 subtypes for compatibility with ANSI/ISO and IBM
> > types.
>
> thanks for the clarification. Changed in r27274. Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140502/7e694514/attachment.html>
More information about the gdal-dev
mailing list