Re: ODBC Problem - Mailing list pgsql-admin

From Peter Darley
Subject Re: ODBC Problem
Date
Msg-id NNEAICKPNOGDBHNCEDCPKEHNCHAA.pdarley@kinesis-cem.com
Whole thread Raw
In response to ODBC Problem  ("Peter Darley" <pdarley@kinesis-cem.com>)
List pgsql-admin
Friends,
    A little more information:

    I'm actually only having this problem with some tables that have triggers
on insert, update and delete.  A table and the assocaited triggers/functions
shown below.  I suspect that something changed in the triggers or functions
in 7.2, but I can't find any documentation on that anywhere.

    As before, any help would be greatly appreciated.

Thanks,
Peter Darley

                              Table "answers_bool"
  Column   |           Type           |                Modifiers
-----------+--------------------------+-------------------------------------
-----
 id        | integer                  | default
nextval('all_answers_seq'::text)
 sampleid  | integer                  |
 value     | boolean                  |
 indicator | text                     |
 surveyid  | integer                  |
 time      | timestamp with time zone | default now()
Indexes: idx_answers_bool_indicator,
         idx_answers_bool_sampleid,
         idx_answers_bool_surveyid
Unique keys: answers_bool_idx
Triggers: answers_bool_update,
          answer_bool_delete,
          answers_bool_insert


CREATE TRIGGER "answer_bool_delete" AFTER DELETE ON "answers_bool" FOR EACH
ROW EXECUTE PROCEDURE delete_time();
CREATE TRIGGER "answers_bool_insert" AFTER INSERT ON "answers_bool" FOR EACH
ROW EXECUTE PROCEDURE insert_time();
CREATE TRIGGER "answers_bool_update" BEFORE UPDATE ON "answers_bool" FOR
EACH ROW EXECUTE PROCEDURE update_time();


CREATE FUNCTION "delete_time"() RETURNS "opaque" AS '
    BEGIN
    INSERT INTO answers_deleted (SampleID, Indicator) VALUES (OLD.sampleid,
OLD.indicator);
    RETURN NULL;
    END;
' LANGUAGE 'plpgsql';


CREATE FUNCTION "insert_time"() RETURNS "opaque" AS '
    BEGIN
    DELETE FROM answers_deleted WHERE SampleID=NEW.sampleid AND
Indicator=NEW.indicator;
    RETURN NULL;
    END;
' LANGUAGE 'plpgsql';


CREATE FUNCTION "update_time"() RETURNS "opaque" AS '
    BEGIN
        NEW.time := ''now'';
        RETURN NEW;
    END;
' LANGUAGE 'plpgsql';

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Peter Darley
Sent: Monday, April 15, 2002 8:41 PM
To: Pgsql-Admin
Subject: [ADMIN] ODBC Problem


Friends,
    Yesterday I upgraded from 7.1.3 on RedHat 6.2 to 7.2.1 on RedHat 7.2, and
now I'm having problems with ODBC connections from access on windows.  The
problem I'm having is that I am unable to change or delete data; it says
that "The microsoft jet database engine stopped the process because you and
another user are attempting to change the same data at the same time".  I'm
able to delete/change data from psql and from my Perl scripts.
    Any suggestions on what I might have done wrong?
Thanks,
Peter Darley


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


pgsql-admin by date:

Previous
From: Charlie Toohey
Date:
Subject: psql command line history not working
Next
From: Jodi Kanter
Date:
Subject: string PK vs. interger PK