Re: Installing temporal "period" data type and support functions

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Installing temporal "period" data type and support functions
Date: 2010-09-01 22:19:51
Message-ID: 87occhumwo.fsf@cbbrowne.afilias-int.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

JJTurner(at)statestreet(dot)com ("Turner, John J") writes:
> You've run into an extreme greenhead here, so my thanks to you for your
> consideration. I'm also at sea with this forum, so I'm not sure how my
> replies need to be addressed/directed in order to maintain the thread
> online?
>
> Re: postgres, I simply installed the package, not the source code.
>
> So based on that and your advice, I would need to install the
> Development package (postgresql-devel)? I don't see anything directly
> relating to that on the Downloads site...
>
> I have a "pg_config.exe" located in c:\program
> files\PostgreSQL\9.0\bin... beyond that I'm stumped at the moment, I'm
> afraid

You shouldn't need the whole PostgreSQL source code tree.

PGTemporal, if it's code similar to...
<http://github.com/davidfetter/PostgreSQL-Temporal>
or
<http://temporal.projects.postgresql.org/>
uses what's called "PGXS" to minimize the profile of how much of the
PostgreSQL sources you need around.

You can find docs on PGXS here:
http://www.postgresql.org/docs/current/static/xfunc-c.html

It certainly does need pg_config to know how to get stuff linked into
the PostgreSQL instance; the fact you have that seems promising.

You probably want to add a line to the PGTemporal Makefile to tell it to
use PGXS. See the one marked "cbbrowne" :-).

-----------------------------------------------
MODULES = period
DATA_built = period.sql
DATA = uninstall_period.sql

USE_PGXS=yes # cbbrowne sez add this. This says to use PGXS

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/temporal
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-----------------------------------------------

You need some dev tools installed, notably suitable C compiler, GNU
Make. I don't know how one arranges that on Windows, alas.
--
(format nil "~S(at)~S" "cbbrowne" "gmail.com")
The statistics on sanity are that one out of every four Americans is
suffering from some form of mental illness. Think of your three best
friends. If they're okay, then it's you. -- Rita Mae Brown

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Charles Holleran 2010-09-02 01:37:44 Create or replace row in table
Previous Message Tom Lane 2010-09-01 22:19:38 Re: Installing temporal "period" data type and support functions