Skip site navigation (1) Skip section navigation (2)

Re: Additional current timestamp values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Additional current timestamp values
Date: 2006-03-21 00:04:40
Message-ID: 9191.1142899480@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> The patch as given strikes me as pretty broken --- it does not advance
>> statement_timestamp when I would expect (AFAICS it only sets it during
>> transaction start).

> Uh, it does advance:

But not once per statement --- in reality, you get a fairly arbitrary
behavior that will advance in some cases and not others when dealing
with a multi-statement querystring.  Your example showing that it fails
to advance in a psql -c string shows this ... don't you think most
people would call that a bug?

If it's "statement" timestamp then I think it ought to advance once per
SQL statement, which this isn't doing.  (As I already said, though, that
isn't the behavior I really want.  My point is just that the code's
behavior is an extremely strange, nonintuitive definition of the word
"statement".)

> I have always been confused if
> statement_timeout times queries inside server-side functions, for
> example.  I don't think it should.

That's exactly my point; I agree that we don't want it doing that,
but that being the case, "statement" isn't a great name for the units
that we are actually processing.  We're really wanting to do these
things once per client command, or maybe per client query would be a
better name.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-03-21 01:58:22
Subject: Re: Additional current timestamp values
Previous:From: Bruce MomjianDate: 2006-03-20 23:53:20
Subject: Re: Additional current timestamp values

pgsql-patches by date

Next:From: Bruce MomjianDate: 2006-03-21 01:58:22
Subject: Re: Additional current timestamp values
Previous:From: Bruce MomjianDate: 2006-03-20 23:54:13
Subject: Re: Removal of backward-compatibility docs mentions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group