You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/08/25 13:07:29 UTC
[GitHub] [incubator-age] nieyankai opened a new issue #110: How to remove a vertex
nieyankai opened a new issue #110:
URL: https://github.com/apache/incubator-age/issues/110
How to remove a vertex?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan edited a comment on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan edited a comment on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909414474
There will be an official incubator-age official docker image soon.
Meanwhile you can do it yourself like this. Takes a few minutes.
I got this from sorrell/docker-agensgraph-extension/dockerfile
Let me know if it works
create a file called Dockerfile in the some directory with the following contents
```
FROM postgres:11
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
bison \
build-essential \
ca-certificates \
flex \
git \
postgresql-plpython3-11 \
postgresql-server-dev-11
RUN git clone https://github.com/apache/incubator-age /age
RUN cd /age && make install
```
Then build the image with
`docker build -t misterion/age .`
then
`docker run -it -e POSTGRES_PASSWORD=mypassword misterion/age`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] JoshInnis closed issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
JoshInnis closed issue #110:
URL: https://github.com/apache/incubator-age/issues/110
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-933526907
There is a docker image of 0.6.0 now available via
docker pull joefagan/incubator-age
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan removed a comment on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan removed a comment on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909499874
I noticed a typo. Command is docker build (not docker built)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-981772860
@Misterion777 did it work? Can we close this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-983738352
@joefagan yes, it worked, sorry for delay, issue can be closed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909188649
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909236348
That error message was from an earlier release eg 0.4.0
Please check that the following shows a later version.
`select extname, extversion from pg_extension where extname='age';`
extname | extversion
---------+------------
age | 0.5.0
(1 row)
The following was run with version 0.5.0 that shows creating and deleting nodes
```
CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('my_graph_name');
SELECT * from cypher('my_graph_name', $$
CREATE (a:Part {part_num: '123'}),
(b:Part {part_num: '345'}),
(c:Part {part_num: '456'}),
(d:Part {part_num: '789'})
$$) as (a agtype);
-- Delete a node
SELECT * from cypher('my_graph_name', $$
MATCH (a:Part {part_num: '123'}) DELETE a
$$) as (a agtype);
-- Confirm node deletion
SELECT * from cypher('my_graph_name', $$
MATCH (a)
RETURN a
$$) as (a agtype);
```
a
-------------------------------------------------------------------------------------
{"id": 844424930131970, "label": "Part", "properties": {"part_num": "345"}}::vertex
{"id": 844424930131971, "label": "Part", "properties": {"part_num": "456"}}::vertex
{"id": 844424930131972, "label": "Part", "properties": {"part_num": "789"}}::vertex
(3 rows)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909414474
There will be an official incubator-age official docker image soon.
Meanwhile you can do it yourself like this. Takes a few minutes.
I got this from sorrell/docker-agensgraph-extension/dockerfile
Let me know if it works
create a file called Dockerfile in the some directory with the following contents
```
FROM postgres:11
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
bison \
build-essential \
ca-certificates \
flex \
git \
postgresql-plpython3-11 \
postgresql-server-dev-11
RUN git clone https://github.com/apache/incubator-age /age
RUN cd /age && make install
```
Then build the image with
`docker built -t misterion/age .`
then
`docker run -it -e POSTGRES_PASSWORD=mypassword misterion/age`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909495657
> There will be an official incubator-age official docker image soon.
> Meanwhile you can do it yourself like this. Takes a few minutes.
>
> I got this from sorrell/docker-agensgraph-extension/dockerfile
>
> Let me know if it works
>
> create a file called Dockerfile in the some directory with the following contents
>
> ```
> FROM postgres:11
> RUN apt-get update
> RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
> bison \
> build-essential \
> ca-certificates \
> flex \
> git \
> postgresql-plpython3-11 \
> postgresql-server-dev-11
>
> RUN git clone https://github.com/apache/incubator-age /age
>
> RUN cd /age && make install
> ```
>
> Then build the image with
> `docker built -t misterion/age .`
>
> then
> `docker run -it -e POSTGRES_PASSWORD=mypassword misterion/age`
Thanks, will try that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909499874
I noticed a typo. Command is docker build (not docker built)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] JoshInnis commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-905707481
You should be able to remove a vertex with the DELETE clause. Use MATCH to get the vertices you want to remove. If the vertex has edges attached add the DETACH option before the delete keyword
`select * from cypher('graph_name', $$ match (n {id: 1}) delete n $$) as (n agtype);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909236348
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] joefagan commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
joefagan commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909236348
That error message was from an earlier release eg 0.4.0
Please check that the following shows a later version.
`select extname, extversion from pg_extension where extname='age';`
extname | extversion
---------+------------
age | 0.5.0
(1 row)
The following was run with version 0.5.0 that shows creating and deleting nodes
```
CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('my_graph_name');
SELECT * from cypher('my_graph_name', $$
CREATE (a:Part {part_num: '123'}),
(b:Part {part_num: '345'}),
(c:Part {part_num: '456'}),
(d:Part {part_num: '789'})
$$) as (a agtype);
-- Delete a node
SELECT * from cypher('my_graph_name', $$
MATCH (a:Part {part_num: '123'}) DELETE a
$$) as (a agtype);
-- Confirm node deletion
SELECT * from cypher('my_graph_name', $$
MATCH (a)
RETURN a
$$) as (a agtype);
```
a
-------------------------------------------------------------------------------------
{"id": 844424930131970, "label": "Part", "properties": {"part_num": "345"}}::vertex
{"id": 844424930131971, "label": "Part", "properties": {"part_num": "456"}}::vertex
{"id": 844424930131972, "label": "Part", "properties": {"part_num": "789"}}::vertex
(3 rows)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909188649
Hey @JoshInnis,
tried your query, I'm getting following error:
`ERROR: return row and column definition list do not match`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909239502
> That error message was from an earlier release eg 0.4.0
> Please check that the following shows a later version.
> `select extname, extversion from pg_extension where extname='age';`
> extname | extversion
> ---------+------------
> age | 0.5.0
> (1 row)
>
> The following was run with version 0.5.0 that shows creating and deleting nodes
>
> ```
>
> CREATE EXTENSION age;
> LOAD 'age';
> SET search_path = ag_catalog, "$user", public;
>
> SELECT create_graph('my_graph_name');
>
> SELECT * from cypher('my_graph_name', $$
> CREATE (a:Part {part_num: '123'}),
> (b:Part {part_num: '345'}),
> (c:Part {part_num: '456'}),
> (d:Part {part_num: '789'})
> $$) as (a agtype);
>
> -- Delete a node
> SELECT * from cypher('my_graph_name', $$
> MATCH (a:Part {part_num: '123'}) DELETE a
> $$) as (a agtype);
>
> -- Confirm node deletion
> SELECT * from cypher('my_graph_name', $$
> MATCH (a)
> RETURN a
> $$) as (a agtype);
> ```
>
> ## a
> {"id": 844424930131970, "label": "Part", "properties": {"part_num": "345"}}::vertex
> {"id": 844424930131971, "label": "Part", "properties": {"part_num": "456"}}::vertex
> {"id": 844424930131972, "label": "Part", "properties": {"part_num": "789"}}::vertex
> (3 rows)
Indeed, i'm on 0.4.0. I'm using official docker container, are there any plans to update it to 0.5.0?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] Misterion777 commented on issue #110: How to remove a vertex
Posted by GitBox <gi...@apache.org>.
Misterion777 commented on issue #110:
URL: https://github.com/apache/incubator-age/issues/110#issuecomment-909188649
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org