Re: [GENERAL] Incrementing a Serial Field

From: David Hartwig <daveh(at)insightdist(dot)com>
To: Bob Kruger <bkruger(at)mindspring(dot)com>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general(at)postgreSQL(dot)org, Byron Nikolaidis <byronn(at)insightdist(dot)com>
Subject: Re: [GENERAL] Incrementing a Serial Field
Date: 1998-11-09 17:42:07
Message-ID: 3647296F.6F7FDDD2@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bob Kruger wrote:

> The second question is that I noticed the ODBC bug (feature?) when linking
> Postgres to MS Access still exists. This bug occurs when linking a MS
> Access table to a Postgres table, and identifying more than one field as
> the unique record identifier. This makes Postgres run until it exhausts
> all available memory. Does anyone know a way around this? Enabling read
> only ODBC is a feature I would like to make available, but I do not want
> the possibility of postgres crashing because of an error on the part of a
> MS Access user.
>
> BTW - Having capability to be linked to an Access database is not an
> option. The current project I am working on calls for that, so it is a
> necessary evil that I hav to live with.
>

In the driver connection settings add the following line.

SET ksql TO 'on';

Stands for: keyset query optimization. This is not considered a final
solution. As such, it is undocumented. Some time in the next day or so, we
will be releasing a version of the driver which will automatically SET ksqo.

You will most likely be satisfied with the results. One problem with this
solution, however, is that it does not work if you have any (some kinds of?)
arrays in the table you are browsing. This is a sideffect of the rewrite to a
UNION which performs an internal sort unique.

Also, if you are using row versioning you may need to overload some operators
for xid and int4. I have included a script that will take care of this.

Bruce, can I get these operators hardcoded into 6.4.1- assuming there will be
one. The operators necessitated by the UNION sideffects.

Attachment Content-Type Size
xidint4.sql text/plain 681 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gene Selkov, Jr. 1998-11-09 17:58:46 is NULL = NULL true or false?
Previous Message root 1998-11-09 17:35:30 OORDBMS