pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Richard Broersma <richard.broersma@gmail.com>
Cc: tlange@gwdg.de
Cc: pgsql-sql@postgresql.org
Subject: Re:
Date: Fri, 21 May 2010 16:15:37 +0800
Message-ID: <4BF64129.10604@postnewspapers.com.au> (raw)
In-Reply-To: <AANLkTin2YCjEqBfu9n_wYwrGccZ0uFTzc8ZyxfmXXGz5@mail.gmail.com>
References: <ed7837818fc165ea7ffdc2efadb4ddc3.squirrel@mailbox.gwdg.de>
	<AANLkTin2YCjEqBfu9n_wYwrGccZ0uFTzc8ZyxfmXXGz5@mail.gmail.com>

On 21/05/2010 9:56 AM, Richard Broersma wrote:
> On Thu, May 20, 2010 at 5:52 PM,<tlange@gwdg.de>  wrote:
>
>> I'm new to triggers in PostgreSQL. I have to create a trigger on insert to
>> increment a sequence to overcome MS-Access' limitation in acknowledging
>> serial "datatype".
>
> Uh?  Access doesn't need to acknowledge the serial datatype.
> At-least in recent versions auto increment is recognized by MS-Access
> just fine (I'm guessing this is due to the Return clause which the
> ODBC driver automatically calls).

Really?

I had problems with Access complaining that the object it just inserted 
had vanished, because the primary key Access had in memory (null) didn't 
match what was stored (the generated PK). I had to fetch the next value 
in the PK sequence manually and store it in Access's record before 
inserting it to work around this.

I wouldn't be surprised if this actually turned out to just require some 
bizarre ODBC driver parameter change, but I never figured it out and I 
couldn't find any info about it on the 'net.

For the original poster: I posted some information about this at the 
time I was working on it, so search the archives of this list for MS Access.

I eventually ditched Access entirely as the user who was demanding the 
use of MS Access relented (phew!), so I put together a simple web-app to 
do what they wanted in a day. Hopefully I'll never need to go near ODBC 
again, because it's a truly "special" way to talk to PostgreSQL.

--
Craig Ringer




view thread (7+ messages)  latest in thread

Message-ID: <4BF64129.10604@postnewspapers.com.au>
Permalink:  ../4BF64129.10604@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4BF64129.10604@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: craig@postnewspapers.com.au, richard.broersma@gmail.com, tlange@gwdg.de
  Subject: Re:
  In-Reply-To: <4BF64129.10604@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox