Re: [GENERAL] v6.5 foreign key trigger reposted with details

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: amy cheng <amycq(at)hotmail(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] v6.5 foreign key trigger reposted with details
Date: 1999-08-17 01:33:54
Message-ID: 37B8BC02.750A28A4@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

amy cheng wrote:
>
> >1. all applications should use BEGIN/END;
> B) what does that mean for perl? or just limited to PL/pgSQL--
> then, isn't BEGIN/END the common syntax in PL/pgSQL?
>
> C) can you give me an outline of PL/pgSQL for 2. and 3. ?
> >2. in first transaction (deleting/updating something in primary table)
> > you have to execute LOCK _primary_table_ IN SHARE ROW EXCLUSIVE MODE
> > _before_ execution of any update/delete statement for the
> > primary table;
> >3. in second transaction (inserting/updating something in foreign
> > table) you have to execute LOCK _primary_table_ IN SHARE MODE
> > _before_ execution of any insert/update statement for the
> > foreign table.
> >
>
> D) I'm not sure yet ALL those can be handled by PS/pgSQL within the
> postgresql? I do not need to handle all of them in perl through
> dbi? If I do, how? and, can I just disable the concurrent

LOCKs can't be handled by PL/pgSQL - you have to execute
LOCKs from your application _before_ update statements.
Turn autocommit off to execute LOCKs and update statements
in one transaction (dbi will use BEGIN/END arround
your statements).

> multiversion in V6.5?

No way.

Vadim

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vadim Mikheev 1999-08-17 01:48:51 Re: [GENERAL] moving from 6.3.2 to 6.5
Previous Message Jeff MacDonald 1999-08-16 19:14:51 XA 2 phase