[Qgis-user] Can't access Oracle sequences

Jürgen E. Fischer jef at norbit.de
Mon Mar 16 14:51:07 PDT 2015


Hi Sylvain,

On Mon, 16. Mar 2015 at 18:01:35 +0100, PIERRE Sylvain wrote:
> With Postgis/QGIS configuration I can manage sequences on primary key when
> editing  new object (editing forms show a nextval(‘xxxxxxxxxx’::regclass)
> formula in pk field)
> With my Oracle/QGIS conf I can’t manage sequences, and editing failed when I want to save.
> Where is the problem?
> Is it an Oracle provider issue ?

Not really.

In PostgreSQL the sequence value is retrieved by a default expression.  In
Oracle sequences used to be retrieved and assigned to the new record using a
before insert trigger.  But in Oracle 12c you can also use default values to
retrieve and assign the next sequence value.  I suppose that works in QGIS too,
but I don't currently have setup a 12c to verify.

So unless you have 12c with a default value, you have to have a trigger to deal
with assigning the key value.



Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode                         
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150316/878b56dc/attachment.sig>


More information about the Qgis-user mailing list