Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
EXTENSION = suncalc_postgres

DATA = suncalc_postgres--0.0.1.sql
#TESTS = $(wildcard test/sql/*.sql)

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
4 changes: 3 additions & 1 deletion suncalc/suncalc.sql → suncalc_postgres--0.0.1.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
\echo Use "CREATE EXTENSION suncalc_postgres" to load this file. \quit

CREATE OR REPLACE FUNCTION sc_fmod(
dividend double precision,
divisor double precision
Expand Down Expand Up @@ -336,4 +338,4 @@ BEGIN
RETURN NEXT;
END LOOP;
END ;
$$ LANGUAGE plpgsql IMMUTABLE;
$$ LANGUAGE plpgsql IMMUTABLE;
5 changes: 5 additions & 0 deletions suncalc_postgres.control
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
comment = 'Solar event calculations for Postgres'
default_version = '0.0.1'
module_pathname = '$libdir/suncalc_postgres'
relocatable = true
requires = ''