Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Randolf Richardson
>> Yes, user-visible. They give additional current timestamp information. >> transaction_timestamp() is the same as current_timestamp, >> clock_timestamp is the same as gettimeofday(), and statement_timestamp >> is a new one that shows statement start time. > > And what would be the point of that

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane writes: >> This is a nonstarter, as is the previous proposal to have a single >> function with an explicit parameter that selects the behavior. The >> reason is that any such function would have to be treated as completely >> non-optimizable.

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Bruce Momjian
Tom Lane wrote: > In general, I do not like options that subtly change the behavior of > long-established functions, anyway. Seems like a great recipe for > breaking people's applications. I'm okay with adding new functions as > per the already-agreed-to set of names (though like Peter I wish we

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Peter Eisentraut
Tom Lane writes: > This is a nonstarter, as is the previous proposal to have a single > function with an explicit parameter that selects the behavior. The > reason is that any such function would have to be treated as completely > non-optimizable. Why? We would just need to ensure that the mode

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Bruce Momjian
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Tom Lane writes: > >> This is a nonstarter, as is the previous proposal to have a single > >> function with an explicit parameter that selects the behavior. The > >> reason is that any such function would have to be treated as comp

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> This is a nonstarter, > Oh, I forgot about that. Peter seems only to want statement_timestamp > and transaction_timestamp. Aren't those both stable if > statement_timestamp is set from exec_simple_query? Hm. If you restricted the o

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > It would be very useful if we had a parameter that controlled whether > current_timestamp maps to statement_timestamp or to transaction_timestamp. This is a nonstarter, as is the previous proposal to have a single function with an explicit parameter t

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Bruce Momjian
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > It would be very useful if we had a parameter that controlled whether > > current_timestamp maps to statement_timestamp or to transaction_timestamp. > > This is a nonstarter, as is the previous proposal to have a single > function

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian writes: > > > The goal was to give a unified API to the various time measurements: > > > > [clock|statement|transaction]_timestamp > > It would be very useful if we had a parameter that controlled whether > current_timestamp maps to statement_timestamp

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-12-01 Thread Peter Eisentraut
Bruce Momjian writes: > The goal was to give a unified API to the various time measurements: > > [clock|statement|transaction]_timestamp It would be very useful if we had a parameter that controlled whether current_timestamp maps to statement_timestamp or to transaction_timestamp. There see

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian writes: > > > Yes, user-visible. They give additional current timestamp information. > > transaction_timestamp() is the same as current_timestamp, > > clock_timestamp is the same as gettimeofday(), and statement_timestamp > > is a new one that shows stateme

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Peter Eisentraut
Bruce Momjian writes: > Yes, user-visible. They give additional current timestamp information. > transaction_timestamp() is the same as current_timestamp, > clock_timestamp is the same as gettimeofday(), and statement_timestamp > is a new one that shows statement start time. And what would be th

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian writes: > > > We have started 7.5 development so we can now work with you to complete > > this item. Your question was what does statement_timestamp() show. > > That has been discussed and it is a little tricky. The idea is that is > > should be start of a

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Peter Eisentraut
Bruce Momjian writes: > We have started 7.5 development so we can now work with you to complete > this item. Your question was what does statement_timestamp() show. > That has been discussed and it is a little tricky. The idea is that is > should be start of a single statement that arrives from

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Bruce Momjian
We have started 7.5 development so we can now work with you to complete this item. Your question was what does statement_timestamp() show. That has been discussed and it is a little tricky. The idea is that is should be start of a single statement that arrives from the user or is requestd by a

Re: [PATCHES] clock_timestamp() and transaction_timestamp() function

2003-11-30 Thread Bruce Momjian
Wang Mike wrote: > add clock_timestamp() and transaction_timestamp() function > > see TODO list get more > > - > > diff -u -r ../cvs/pgsql/src/backend/utils/adt/timestamp.c > ../pgsql/src/backend/utils/adt/timestamp.c > --- ../cvs/

[PATCHES] clock_timestamp() and transaction_timestamp() function

2003-07-19 Thread Wang Mike
add clock_timestamp() and transaction_timestamp() function see TODO list get more - diff -u -r ../cvs/pgsql/src/backend/utils/adt/timestamp.c ../pgsql/src/backend/utils/adt/timestamp.c --- ../cvs/pgsql/src/backend/utils/adt/timesta