Re: AW: [HACKERS] inserts/updates problem under stressing !

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: jwieck(at)debis(dot)com, Zeugswetter Andreas IZ5 <Andreas(dot)Zeugswetter(at)telecom(dot)at>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: AW: [HACKERS] inserts/updates problem under stressing !
Date: 1999-07-26 12:06:18
Message-ID: Pine.GSO.3.96.SK.990726160517.19354A-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 26 Jul 1999, Philip Warner wrote:

> Date: Mon, 26 Jul 1999 19:14:02 +1000
> From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
> To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>,
> Zeugswetter Andreas IZ5 <Andreas(dot)Zeugswetter(at)telecom(dot)at>
> Cc: pgsql-hackers(at)postgreSQL(dot)org
> Subject: Re: AW: [HACKERS] inserts/updates problem under stressing !
>
> At 12:54 26/07/99 +0400, Oleg Bartunov wrote:
> >Andreas,
> >
> >I rewrote my function but got a problem how to know if update fails:
> >
> >CREATE FUNCTION "acc_hits" (int4) RETURNS datetime AS '
> >Declare
> > keyval Alias For $1;
> > cnt int4;
> > curtime datetime;
> >Begin
> > curtime := ''now'';
> > Update hits set count = count + 1,last_access = curtime where msg_id =
> keyval;
> > if Not Found then
> > ??????????
>
> You need a patch to plpgsql with adds:
>
> GET DIAGNOSTICS SELECT PROCESSED INTO num_of_rows_affected;
>
> where num_of_rows_affected is a local variable.
>
> The patch is currently with Jan, who is quite busy.
>

Jan, did you approve the patch. Is it usable with 6.5.1 ?

Oleg

>
> > -- first_access inserted on default, last_access is NULL
> > Insert Into hits (msg_id,count) values (keyval, 1);
> > End If;
> > return curtime;
> >End;
> >' LANGUAGE 'plpgsql';
> >
> >
> >
> > regards,
> >
> > Oleg
> >
> >
> >
> >
> >
> >
> >On Mon, 26 Jul 1999, Zeugswetter Andreas IZ5 wrote:
> >
>
> ----------------------------------------------------------------
> Philip Warner | __---_____
> Albatross Consulting Pty. Ltd. |----/ - \
> (A.C.N. 008 659 498) | /(@) ______---_
> Tel: +61-03-5367 7422 | _________ \
> Fax: +61-03-5367 7430 | ___________ |
> Http://www.rhyme.com.au | / \|
> | --________--
> PGP key available upon request, | /
> and from pgp5.ai.mit.edu:11371 |/
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-07-26 12:29:34 postgres Web problem
Previous Message Vince Vielhaber 1999-07-26 11:32:33 Re: [HACKERS] PATCH for pgconnection.h