On 11/22/11 1:51 AM, Enrico Sirola wrote:
create or replace function current_xlog_bytes()
returns int8
as
$$
select cast(cast( 'x' || lpad(split_part(
pg_current_xlog_location(), '/', 1),
8, '0')
as bit(32))
as int8) * 16*1024*1024*254 +
cast(cast( 'x' || lpad(split_part(
pg_current_xlog_location(), '/', 2),
8, '0')
as bit(32))
as int8)
$$
language sql immutable strict;
Any comment?
I don't believe that function is immutable, since it depends on the
value of pg_current_xlog_location() which will change over time.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general