Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
petropavel13 committed Sep 20, 2014
1 parent 0b43bfc commit ea617c4
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,26 @@ pg_rrule
========

Usage
-----
```sql
SELECT 'FREQ=WEEKLY;INTERVAL=1;WKST=MO;UNTIL=20200101T045102Z'::rrule;
rrule
------------------------------------
FREQ=WEEKLY;UNTIL=20200101T045102Z
(1 row)
```

Get RRULE parameter get_PARAMNAME.

Example. Get freq param:
```sql
SELECT get_freq('FREQ=WEEKLY;INTERVAL=1;WKST=MO;UNTIL=20200101T045102Z'::rrule);
get_freq
----------
WEEKLY
(1 row)
```

Example. Get byday param:
```sql
SELECT get_byday('FREQ=WEEKLY;INTERVAL=1;WKST=MO;UNTIL=20200101T045102Z;BYDAY=MO,TH,SU'::rrule);
get_byday
-----------
{2,5,1}
(1 row)
```

Example. Expand RRULE with timezone:
```sql
SELECT * FROM
unnest(
Expand All @@ -42,7 +37,7 @@ Usage
2019-12-28 10:51:02+00
(4 rows)
```

Example. Expand RRULE without timezone:
```sql
SELECT * FROM
unnest(
Expand All @@ -58,10 +53,29 @@ Usage
2019-12-28 10:51:02
(4 rows)
```
Building
Simple building:
--------

A long description
```sh
cd src/
qmake pg_rrule.pro
make
```
Simple install (Linux):
```sh
cp libpg_rrule.so /usr/lib/postgresql/pg_rrule.so
cp pg_rrule.control /usr/share/postgresql/extension/
cp sql/pg_rrule.sql /usr/share/postgresql/extension/pg_rrule--0.1.0.sql
```
Simple install (OS X):
```sh
#TODO
```
Install extension (Postgresql):
```sql
CREATE EXTENSION pg_rrule;
```

Building (A long description (not tested))

To build it, just do this:

Expand Down

0 comments on commit ea617c4

Please sign in to comment.