Menu

HowTo

Daniel Sheffield

Download and Prepare Environment

Download and install PGsql.
Download and install SVN.
Download the source code from the svn repository.

Run

Connect to postgres:

~~~~
psql -h localhost -U postgres --command='\i init.sql'
~~~~

After the first run you need only use:

~~~~
psql -h localhost -U postgres --comand='\i init.sql'
~~~~

Experiment

Some commands to try:

SELECT * FROM people; -- list the people in the databas
SELECT * FROM search_people('{Saul},son-of,{Kish}'); -- the first King of Israel
SELECT * FROM search_people('{Belteshazzar}');
SELECT * FROM insert_people('{Saul,Paul}','male'); -- Paul the apostle.
SELECT * FROM insert_people('{Daniel}','male'); -- the prophet Daniel
SELECT * FROM update_people('{Daniel}','names','{Belteshazzar}'); -- add Belteshazzar as one of Daniel's names
SELECT * FROM search_people('*,son-of,{Abraham}') -- list the sons of Abraham
SELECT * FROM search_people('*,parent-of,{Amalek}') -- list the parents of Amalek
\df *people -- list the public functions that act on the people table
\df *spouses -- list the public functions that act on the spouses table

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.