petropavel13 / pg_rrule

RRULE data type for PostgreSQL
MIT License
161 stars 29 forks source link

Build fixes #1

Closed groner closed 8 years ago

groner commented 8 years ago

Hi @petropavel13, neat project! I've been working on getting it to build, install and successfully run the tests on my Ubuntu 2015.04 system with PostgreSQL 9.4. Here are fixes for some issues I've run into. The commit messages contain additional explanation for the changes where I thought it was needed.

With these changes, installcheck fails with only superficial issues. I used make installcheck PG_REGRESS_DIFF_OPTS=-uw to get this output.

--- /home/kai/src/pg_rrule/test/expected/base.out   2015-10-15 22:32:28.218434437 -0400
+++ /home/kai/src/pg_rrule/results/base.out 2015-10-15 22:32:37.073876812 -0400
@@ -1,5 +1,5 @@
 \set ECHO 0
-
+unrecognized value "0" for "ECHO"; assuming "none"
 SELECT 'FREQ=WEEKLY;INTERVAL=1;WKST=MO;UNTIL=20200101T045102Z'::rrule;
               rrule
 ------------------------------------
@@ -24,11 +24,11 @@
             '2019-12-07 10:51:02+00'::timestamp with time zone)
     );
          unnest
-------------------------
- 2019-12-07 10:51:02+00
- 2019-12-14 10:51:02+00
- 2019-12-21 10:51:02+00
- 2019-12-28 10:51:02+00
+------------------------------
+ Sat Dec 07 02:51:02 2019 PST
+ Sat Dec 14 02:51:02 2019 PST
+ Sat Dec 21 02:51:02 2019 PST
+ Sat Dec 28 02:51:02 2019 PST
 (4 rows)

 SELECT * FROM
@@ -37,11 +37,11 @@
             '2019-12-07 10:51:02'::timestamp)
     );
        unnest
----------------------
- 2019-12-07 10:51:02
- 2019-12-14 10:51:02
- 2019-12-21 10:51:02
- 2019-12-28 10:51:02
+--------------------------
+ Sat Dec 07 10:51:02 2019
+ Sat Dec 14 10:51:02 2019
+ Sat Dec 21 10:51:02 2019
+ Sat Dec 28 10:51:02 2019
 (4 rows)

 ROLLBACK;

======================================================================

There are some whitespace differences that aren't shown here because I used diff -w.

pg_regress appears to set datestyle = Postgres, MDY and timezone = PST8PDT (-800). I'm in EST5EDT (-500). I assume this is to make tests run in predictable ways. It looks like they can be overridden by setting the environment variables PGDATESTYLE and PGTZ, but it might be sensible to just use the settings pg_regress provides.

petropavel13 commented 8 years ago

Hi @groner! Thank you for your contribution.