Code

postrr.git
12 years agoCData: Use errdetail() rather than errhint() to report details ;-)
Sebastian Harl [Tue, 30 Oct 2012 08:57:59 +0000 (09:57 +0100)]
CData: Use errdetail() rather than errhint() to report details ;-)

12 years agoRRTimeslice: Quote the lower/upper bounds in the range output.
Sebastian Harl [Tue, 30 Oct 2012 07:03:28 +0000 (08:03 +0100)]
RRTimeslice: Quote the lower/upper bounds in the range output.

12 years agoRRTimeslice: Updated output format to <range> #<seq>/<num>.
Sebastian Harl [Tue, 30 Oct 2012 06:55:42 +0000 (07:55 +0100)]
RRTimeslice: Updated output format to <range> #<seq>/<num>.

That is, format the timeslice in a range format (cf. tstzrange in PostgreSQL
9.2). I suppose this is easier to read for humans, even though it's a bit
longer. Also, include the number of timeslices in addition to the sequence
number as well. This way, we're able to unambiguously parse the output.

12 years agoCData: Fixed handling of whitespace + garbage detection at end of input.
Sebastian Harl [Tue, 30 Oct 2012 06:41:20 +0000 (07:41 +0100)]
CData: Fixed handling of whitespace + garbage detection at end of input.

WTF happened there?!? ;-)

12 years agoRRTimeslice: Don't encode invalid (0) intervals in the output function.
Sebastian Harl [Tue, 30 Oct 2012 06:24:02 +0000 (07:24 +0100)]
RRTimeslice: Don't encode invalid (0) intervals in the output function.

12 years agopostrr.h: Updated prototype for rrtimeslice_to_timestamptz().
Sebastian Harl [Tue, 30 Oct 2012 06:19:17 +0000 (07:19 +0100)]
postrr.h: Updated prototype for rrtimeslice_to_timestamptz().

12 years agoRRTimeslice: Use TimestampTz rather than timestamp without time zone.
Sebastian Harl [Mon, 29 Oct 2012 13:47:17 +0000 (14:47 +0100)]
RRTimeslice: Use TimestampTz rather than timestamp without time zone.

This will, hopefully, avoid a whole lota problems when it comes to using
PostRR with daylight savings time, different time zones, etc.

12 years agobase: Include extra version information in postrr_version() output.
Sebastian Harl [Mon, 29 Oct 2012 13:41:27 +0000 (14:41 +0100)]
base: Include extra version information in postrr_version() output.

12 years agopgtest.sh: Make it possible to specify PG_CONFIG thru the environment.
Sebastian Harl [Mon, 29 Oct 2012 13:40:39 +0000 (14:40 +0100)]
pgtest.sh: Make it possible to specify PG_CONFIG thru the environment.

12 years agouninstall_postrr.sql: Drop table "postrr.rrarchives".
Sebastian Harl [Mon, 29 Oct 2012 12:01:36 +0000 (13:01 +0100)]
uninstall_postrr.sql: Drop table "postrr.rrarchives".

12 years agopostrr.sql: Added PostRR_update() functions.
Sebastian Harl [Tue, 23 Oct 2012 11:34:56 +0000 (13:34 +0200)]
postrr.sql: Added PostRR_update() functions.

These functions may be used to insert or update a value in an archive. The
functions expect a timestamp and double precision value as arguments to
describe the new values. The postrr.rrarchives will then be used to look up
the actual place where to store the values (there may be multiple ones).

There are currently two overloaded versions of this function. One accepts the
name of an archive and the other expects the definition of an archive as
arguments. The latter is meant to be used for internal purposes while the
other is meant to be used by the user. This is not enforced in any way, though
(and I don't see any reason to do so).

12 years agopostrr.sql: Added 'postrr.rrarchives' table.
Sebastian Harl [Tue, 23 Oct 2012 11:31:36 +0000 (13:31 +0200)]
postrr.sql: Added 'postrr.rrarchives' table.

This table will be used to store "Round Robin Archive" definitions. Each
archive has a name which may be used to identify the archive and a description
of the table(s) that store the values of the archive. Each entry specifies the
table as well as the RRTimeslice and CData columns to be used for storing the
values.

12 years agopgtest.sh: Added documentation for 'restart'.
Sebastian Harl [Tue, 23 Oct 2012 11:04:25 +0000 (13:04 +0200)]
pgtest.sh: Added documentation for 'restart'.

12 years agopgtest.sh: Added 'restart' command.
Sebastian Harl [Tue, 23 Oct 2012 11:03:26 +0000 (13:03 +0200)]
pgtest.sh: Added 'restart' command.

This will restart the PostgreSQL server in the background if it was running
previously.

12 years agoCData: Check both arguments of CData_update() for NULL.
Sebastian Harl [Tue, 23 Oct 2012 11:02:58 +0000 (13:02 +0200)]
CData: Check both arguments of CData_update() for NULL.

12 years agoCData: Declared CData_update() as not strict.
Sebastian Harl [Tue, 23 Oct 2012 10:49:11 +0000 (12:49 +0200)]
CData: Declared CData_update() as not strict.

Any or all arguments may in fact be NULL. This happens, e.g., when updating
single CData columns one by one. In this case, use the other argument as
return value, i.e. leaving it unmodified.

12 years agoCData: Include CF function in output string.
Sebastian Harl [Tue, 23 Oct 2012 10:34:01 +0000 (12:34 +0200)]
CData: Include CF function in output string.

This makes all information available that are required to regenerate the same
CData object from the stringified version.

12 years agopgtest.sh: Exit with status zero when using the 'help' command.
Sebastian Harl [Mon, 22 Oct 2012 08:50:09 +0000 (10:50 +0200)]
pgtest.sh: Exit with status zero when using the 'help' command.

12 years agopgtest.sh: Improved help/usage output.
Sebastian Harl [Mon, 22 Oct 2012 08:49:10 +0000 (10:49 +0200)]
pgtest.sh: Improved help/usage output.

12 years agopgtest.sh: Changed PostgreSQL port to 2345.
Sebastian Harl [Thu, 18 Oct 2012 13:49:46 +0000 (15:49 +0200)]
pgtest.sh: Changed PostgreSQL port to 2345.

This is somewhat related to the default port (5432) but we can probably be
fairly sure this is not used otherwise.

12 years agopgtest.sh: 'setup': Create database for the current user.
Sebastian Harl [Sun, 14 Oct 2012 21:17:30 +0000 (23:17 +0200)]
pgtest.sh: 'setup': Create database for the current user.

… rather than using a hard-coded value.

12 years agopostrr_comments.sql: Added comment for CData type.
Sebastian Harl [Sun, 14 Oct 2012 21:13:36 +0000 (23:13 +0200)]
postrr_comments.sql: Added comment for CData type.

12 years agopostrr.7: Added a short description for the CData data type.
Sebastian Harl [Sun, 14 Oct 2012 21:12:02 +0000 (23:12 +0200)]
postrr.7: Added a short description for the CData data type.

12 years agoconfigure: Added a few "checking ..." messages for convenience.
Sebastian Harl [Sun, 14 Oct 2012 21:02:19 +0000 (23:02 +0200)]
configure: Added a few "checking ..." messages for convenience.

12 years agoconfigure.ac: Replaced place-holder help text.
Sebastian Harl [Sun, 14 Oct 2012 20:46:49 +0000 (22:46 +0200)]
configure.ac: Replaced place-holder help text.

12 years agoautogen.sh: Improved "help" output.
Sebastian Harl [Sun, 14 Oct 2012 20:41:09 +0000 (22:41 +0200)]
autogen.sh: Improved "help" output.

12 years agoCData: added a cast to double precision.
Sebastian Harl [Thu, 10 May 2012 13:10:58 +0000 (15:10 +0200)]
CData: added a cast to double precision.

The cast may only be done explicitly.

12 years agoCData: Added cdata_update().
Sebastian Harl [Thu, 10 May 2012 12:35:54 +0000 (14:35 +0200)]
CData: Added cdata_update().

This function may be used to update an existing data set by "merging" another
data set according to the consolidation function.

12 years agoRRTimeslice: added a cast to timestamp.
Sebastian Harl [Wed, 9 May 2012 15:24:19 +0000 (17:24 +0200)]
RRTimeslice: added a cast to timestamp.

12 years agoRRTimeslice: Changed all comparison operators to compare SEQ only.
Sebastian Harl [Tue, 8 May 2012 13:51:13 +0000 (15:51 +0200)]
RRTimeslice: Changed all comparison operators to compare SEQ only.

Else, a b-tree won't work (d'oh!).

12 years agorrtimeslice: Added hash function and operator class.
Sebastian Harl [Thu, 3 May 2012 19:44:08 +0000 (21:44 +0200)]
rrtimeslice: Added hash function and operator class.

12 years agopgtest.sh: Pass additional arguments to client and start.
Sebastian Harl [Mon, 30 Apr 2012 14:29:31 +0000 (16:29 +0200)]
pgtest.sh: Pass additional arguments to client and start.

Also, check for any additional arguments in all other commands.

12 years agoCData: Added casts from integer and numeric to cdata.
Sebastian Harl [Mon, 30 Apr 2012 12:52:34 +0000 (14:52 +0200)]
CData: Added casts from integer and numeric to cdata.

Both casts are marked 'AS ASSIGNMENT'.

12 years agoCData: Use float8 rather than double.
Sebastian Harl [Mon, 30 Apr 2012 12:51:30 +0000 (14:51 +0200)]
CData: Use float8 rather than double.

This makes the storage size explicit.

12 years agouninstall_postrr.sql: Drop CData type and all related functions, casts, too.
Sebastian Harl [Sun, 29 Apr 2012 18:50:06 +0000 (20:50 +0200)]
uninstall_postrr.sql: Drop CData type and all related functions, casts, too.

12 years agoCData: Added support for a type modifier.
Sebastian Harl [Sun, 29 Apr 2012 18:49:12 +0000 (20:49 +0200)]
CData: Added support for a type modifier.

The type modifier may be any of 'MIN', 'AVG', 'MAX', specifying the
consolidation function to be used.

12 years agoCData: fixed typo: RRTIMESLICE → CDATA.
Sebastian Harl [Sun, 29 Apr 2012 18:39:58 +0000 (20:39 +0200)]
CData: fixed typo: RRTIMESLICE → CDATA.

Since the affected macro basically did the same, this error did not matter
much, though.

12 years agoAdded initial version of the CData data type.
Sebastian Harl [Sat, 28 Apr 2012 17:35:57 +0000 (19:35 +0200)]
Added initial version of the CData data type.

For now, the type provides simple input and output functions only.

12 years agopgtest.sh: Added a small helper script to setup/run a PG test setup.
Sebastian Harl [Sat, 28 Apr 2012 15:57:02 +0000 (17:57 +0200)]
pgtest.sh: Added a small helper script to setup/run a PG test setup.

12 years agoInitial import of PostRR -- the PostgreSQL Round-Robin Extension. postrr-0.0.0
Sebastian Harl [Sat, 28 Apr 2012 15:33:10 +0000 (17:33 +0200)]
Initial import of PostRR -- the PostgreSQL Round-Robin Extension.

For now, this is an early and highly experimental incomplete draft ;-)

The current version provides a new data type "RRTimeslice" implementing basic
round-robin features. It is defined by the length of the slice and the number
of slices before wrapping around, both specified using the type modifier. It
provides basic comparison operators and an operator class for the btree
indexing method.