Skip to content

PostGraphDB/postgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

30902d4 · Mar 12, 2025
Nov 3, 2024
Jul 24, 2023
Jun 19, 2023
Oct 30, 2024
Mar 12, 2025
Mar 12, 2025
Mar 12, 2025
Aug 24, 2022
Oct 22, 2024
Mar 24, 2023
Jun 19, 2023
Jun 13, 2023
Mar 12, 2025
Oct 26, 2024
Oct 29, 2023
Oct 17, 2023

Repository files navigation

PostGraph

Introduction

PostGraph is a multi-model, graph centric query engine build on Postgres. PostGraph is designed to work fast with your OLTP, OLAP and AI Applications.

Requirements

  • Linux
  • PostGIS 3.3
  • Development Files for PostgreSQL and PostGIS

Building & Installation From Source

Download and Install the postgres_for_postgraph source

git clone https://github.com/PostGraphDB/postgres_for_postgraph
cd postgres_for_postgraph
./configure --prefix=($pwd)
make
sudo make install

Install PostGIS

Install PostGraph

git clone https://github.com/PostGraphDB/postgraph
cd postgraph
make POSTGIS_DIR=/path/to/postgis/source/files
sudo make install

Once PostGraph is installed, it needs to be enabled in each database you want to use it in. In the example below we use a database named postgraph.

createdb postgraph
psql postgraph -c "CREATE EXTENSION PostGIS"
psql postgraph -c "CREATE EXTENSION LTree"
psql postgraph -c "CREATE EXTENSION PostGraph"

You can find the location of the postgresql.conf file as given next:

$ which postgres
/usr/local/pgsql/bin/postgres
$ ls /usr/local/pgsql/data/postgresql.conf
/usr/local/pgsql/data/postgresql.conf

As can be seen, the PostgreSQL binaries are in the bin subdirectory while the postgresql.conf file is in the data subdirectory.

Set the following in postgresql.conf depending on the version of PostGraph and it's dependecy PostGIS:

shared_preload_libraries = 'postgraph'

POSTGIS Dependencies: autoconf automake libtool libxml2-devel geos-devel proj-devel protobuf-devel protobuf-c-compiler protobuf-compiler gdal-devel

Quick Start

Use psql to start a command line session with your database

psql postgraph

Create a graph

CREATE GRAPH graph_name;

Set the Graph being used

USE GRAPH graph_name;

Create Data with the CREATE command

CREATE (v { name: 'Hello Graph!'}) RETURN v;

Find data with the MATCH command

MATCH (n) RETURN n;

Thank You to All the Supporters!

Stargazers repo roster for @Postgraphdb/postgraph Forkers repo roster for @Postgraphdb/postgraph