Thread: Installing temporal "period" data type and support functions
One of the current projects I’m working on calls for a database with temporal support, thus I came across PostgreSQL being informed that it was “headed in the right direction” and as far as I can see, goes further than mySQL in that respect.
I’ve since installed the postgreSQL 9.0 Beta version and have it running on my workstation.
I found the temporal package at http://pgfoundry.org/projects/temporal which I downloaded. My question is “What do I need to do with these files in order to integrate the temporal support with my version of PostgreSQL?”
I see some .c files, .html files, etc., but I’m at a loss as to how to get these tied into the platform. Any help greatly appreciated.
Thanks,
John
"Turner, John J" <JJTurner@statestreet.com> writes: > I've since installed the postgreSQL 9.0 Beta version and have it running > on my workstation. > I found the temporal package at http://pgfoundry.org/projects/temporal > which I downloaded. My question is "What do I need to do with these > files in order to integrate the temporal support with my version of > PostgreSQL?" > I see some .c files, .html files, etc., but I'm at a loss as to how to > get these tied into the platform. Any help greatly appreciated. How did you install Postgres ... build from source, or install a distribution's package? If the former, you probably have everything you need, if the latter, maybe not. You will need Postgres' developer support files (typically in a separate subpackage such as postgresql-devel), as well as a C compiler and related tools. Make sure you have a program called pg_config in your path, and that the directory "pg_config --includedir-server" points to contains a bunch of files. Once you've got everything, building the extension from source code should be a matter of "make" and "make install". You might have to do the "make install" as root depending on where the files are going. If "make" fails it's most likely because you're missing some tools. After that, run the installed temporal.sql file in whichever database(s) you want the datatype and functions available in. This part needs to be done as database superuser. regards, tom lane
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 Thanks, John -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, September 01, 2010 5:30 PM To: Turner, John J Cc: pgsql-novice@postgresql.org Subject: Re: [NOVICE] Installing temporal "period" data type and support functions "Turner, John J" <JJTurner@statestreet.com> writes: > I've since installed the postgreSQL 9.0 Beta version and have it running > on my workstation. > I found the temporal package at http://pgfoundry.org/projects/temporal > which I downloaded. My question is "What do I need to do with these > files in order to integrate the temporal support with my version of > PostgreSQL?" > I see some .c files, .html files, etc., but I'm at a loss as to how to > get these tied into the platform. Any help greatly appreciated. How did you install Postgres ... build from source, or install a distribution's package? If the former, you probably have everything you need, if the latter, maybe not. You will need Postgres' developer support files (typically in a separate subpackage such as postgresql-devel), as well as a C compiler and related tools. Make sure you have a program called pg_config in your path, and that the directory "pg_config --includedir-server" points to contains a bunch of files. Once you've got everything, building the extension from source code should be a matter of "make" and "make install". You might have to do the "make install" as root depending on where the files are going. If "make" fails it's most likely because you're missing some tools. After that, run the installed temporal.sql file in whichever database(s) you want the datatype and functions available in. This part needs to be done as database superuser. regards, tom lane
"Turner, John J" <JJTurner@statestreet.com> writes: > 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 Oh, then this is Windows? Sorry, my comments were for Unix-ish platforms. I'm afraid I don't know anything about building software on Windows ... but you probably don't want to get involved with that anyway. You should look around and see if there's a prepackaged version of the temporal module available already. If you used the one-click Windows installer for PG, the "StackBuilder" component might have it available. regards, tom lane
JJTurner@statestreet.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@~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
Tom, thank again - PG did install with StackBuilder, but when I try to use it to pull the list of available applications, I'm getting an error message: Failed to open the application list: http://www.postgresql.org/applications-v2.xml Error: The URL specified could not be opened When I navigate to the URL using my browser, it simply displays html code...? -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, September 01, 2010 6:20 PM To: Turner, John J Cc: pgsql-novice@postgresql.org Subject: Re: [NOVICE] Installing temporal "period" data type and support functions "Turner, John J" <JJTurner@statestreet.com> writes: > 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 Oh, then this is Windows? Sorry, my comments were for Unix-ish platforms. I'm afraid I don't know anything about building software on Windows ... but you probably don't want to get involved with that anyway. You should look around and see if there's a prepackaged version of the temporal module available already. If you used the one-click Windows installer for PG, the "StackBuilder" component might have it available. regards, tom lane
"Turner, John J" <JJTurner@statestreet.com> writes: > PG did install with StackBuilder, but when I try to use it to pull the > list of available applications, I'm getting an error message: > Failed to open the application list: > http://www.postgresql.org/applications-v2.xml > Error: The URL specified could not be opened Hmm. I passed this on to the relevant folk at EDB, but it's late in the day there, nothing may get done about it till tomorrow. regards, tom lane