Changeset 137 for trunk

Show
Ignore:
Timestamp:
04/27/10 20:37:34 (4 years ago)
Author:
robert
Message:

make this look like the other contrib modules

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/contrib/control/INSTALL.control

    r134 r137  
    1 # create the control schema using control.sql 
     1# create the controldata schema using controldata.sql 
  • trunk/contrib/control/Makefile

    r134 r137  
    1 MODULE_big      = control 
    2 OBJS            = control.o 
    3 DOCS            = README.control 
    4 DATA            = uninstall_control.sql control.sql 
     1MODULE_big      = controldata 
     2OBJS            = controldata.o 
     3DOCS            = README.controldata 
     4DATA            = uninstall_controldata.sql controldata.sql 
    55 
    66ifdef USE_PGXS 
     
    99include $(PGXS) 
    1010else 
    11 subdir = contrib/control 
     11subdir = contrib/controldata 
    1212top_builddir = ../.. 
    1313include $(top_builddir)/src/Makefile.global 
  • trunk/contrib/control/README.control

    r136 r137  
    11 
    2 select * from pgtreats_control.pg_control; 
     2select * from controldata.pg_control; 
    33 
    44# do something interesting 
    5 postgres=# select value as last_checkpoint, now(), checkpoint_timeout, now() - value as lag, now() - value > checkpoint_timeout as is_behind from (select  value::timestamptz, (select setting::interval from pg_settings where name = 'checkpoint_timeout') as checkpoint_timeout  from pgtreats_control.pg_control where name = 'checkPointCopy.time') x ; 
     5postgres=# select value as last_checkpoint, now(), checkpoint_timeout, now() - value as lag, now() - value > checkpoint_timeout as is_behind from (select  value::timestamptz, (select setting::interval from pg_settings where name = 'checkpoint_timeout') as checkpoint_timeout  from crontroldata.pg_control where name = 'checkPointCopy.time') x ; 
    66    last_checkpoint     |             now              | checkpoint_timeout |      lag       | is_behind  
    77------------------------+------------------------------+--------------------+----------------+----------- 
  • trunk/contrib/control/control.sql

    r134 r137  
    11BEGIN; 
    2 create schema pgtreats_control
     2create schema controldata
    33 
    4 create function pgtreats_control.variables(name out text, value out text) 
    5 returns setof record as 'control.so', 'pg_control_variables' 
     4create function controldata.variables(name out text, value out text) 
     5returns setof record as 'controldata.so', 'pg_control_variables' 
    66language C immutable; 
    77 
    8 create view pgtreats_control.pg_control as 
    9 select * from pgtreats_control.variables(); 
     8create view controldata.pg_controldata as 
     9select * from controldata.variables(); 
    1010 
    1111COMMIT; 
  • trunk/contrib/control/uninstall_control.sql

    r134 r137  
    1 drop schema pgtreats_control cascade; 
     1drop schema controldata cascade;