Commit 69ab7fd 1 parent 6d6b365 commit 69ab7fd Copy full SHA for 69ab7fd
File tree 3 files changed +39
-0
lines changed
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ RUN apt-get update && \
102
102
# runtime requirement for using spatialite with sqlite_fdw
103
103
libsqlite3-mod-spatialite \
104
104
pgagent \
105
+ postgresql-$PG_MAJOR-age \
105
106
postgresql-$PG_MAJOR-asn1oid \
106
107
postgresql-$PG_MAJOR-credcheck \
107
108
postgresql-$PG_MAJOR-cron \
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ For more detailed instructions about how to start and control your Postgres cont
22
22
23
23
## Available extensions
24
24
25
+ - [ age] ( https://github.com/apache/age )
25
26
- [ asn1oid] ( https://github.com/df7cb/pgsql-asn1oid )
26
27
- [ credcheck] ( https://github.com/MigOpsRepos/credcheck )
27
28
- [ ddlx] ( https://github.com/lacanoid/pgddl )
Original file line number Diff line number Diff line change @@ -20,6 +20,43 @@ CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;
20
20
SELECT PostGIS_Full_Version();
21
21
22
22
23
+ -- https://github.com/apache/age
24
+ CREATE EXTENSION age;
25
+ LOAD ' age' ;
26
+
27
+ BEGIN ;
28
+
29
+ SET search_path = ag_catalog, " $user" , public;
30
+
31
+ SELECT create_graph(' graph_name' );
32
+
33
+ -- create vertices
34
+ SELECT * FROM cypher(' graph_name' , $$CREATE (:label {property:" Node A" })$$) as (v agtype);
35
+ SELECT * FROM cypher(' graph_name' , $$CREATE (:label {property:" Node B" })$$) as (v agtype);
36
+
37
+ -- create an edge between two nodes and set its properties
38
+ SELECT * FROM cypher(
39
+ ' graph_name' ,
40
+ $$
41
+ MATCH (a:label), (b:label)
42
+ WHERE a .property = ' Node A' AND b .property = ' Node B'
43
+ CREATE (a)- [e:RELTYPE {property:a .property + ' <->' + b .property }]- > (b)
44
+ RETURN e
45
+ $$
46
+ ) as (e agtype);
47
+
48
+ -- query the connected nodes
49
+ SELECT * from cypher(
50
+ ' graph_name' ,
51
+ $$
52
+ MATCH (V)- [R]- (V2)
53
+ RETURN V,R,V2
54
+ $$
55
+ ) as (V agtype, R agtype, V2 agtype);
56
+
57
+ ROLLBACK ;
58
+
59
+
23
60
-- https://github.com/df7cb/pgsql-asn1oid
24
61
CREATE EXTENSION IF NOT EXISTS asn1oid;
25
62
SELECT ' 1.3.6.1.4.1' ::asn1oid;
You can’t perform that action at this time.
0 commit comments