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 2022/03/16 01:07:59 UTC

[GitHub] [incubator-age] bravius opened a new issue #200: How to create a unique constraint like in AgensGraph?

bravius opened a new issue #200:
URL: https://github.com/apache/incubator-age/issues/200


   ### Discussed in https://github.com/apache/incubator-age/discussions/199
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **bravius** March 15, 2022</sup>
   In AgensGraph I could create a unique property constraint using this syntax:
   
   `CREATE CONSTRAINT ON account ASSERT email IS UNIQUE;`
   
   What is the equivalent in Apache AGE for creating a unique constraint on a property?</div>


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes like this is a no-no? 
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes like this is a no-no (I've run into the SET bug as well [#161](https://github.com/apache/incubator-age/issues/161) )?
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > "Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph."
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes like this is a no-no? 
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius commented on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius commented on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > "Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph."
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes like this is a no-no? 
   
   For example:
   
   `CREATE UNIQUE INDEX email ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes using standard pgsql syntax is a no-no (I've run into the SET bug as well [#161](https://github.com/apache/incubator-age/issues/161) )?
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((to_jsonb(properties)->>'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] pdpotter commented on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
pdpotter commented on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1068815971


   There is already an issue about unique properties / indexing at #45. Unique constraints can be added. There is however an issue with unique constraints after the usage of a `set` clause, see #161.


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes using standard pgsql syntax is a no-no (I've run into the SET bug as well [#161](https://github.com/apache/incubator-age/issues/161) )?
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((to_jsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes using standard pgsql syntax is a no-no (I've run into the SET bug as well [#161](https://github.com/apache/incubator-age/issues/161) )?
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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] bravius edited a comment on issue #200: How to create a unique constraint on a property, like in AgensGraph?

Posted by GitBox <gi...@apache.org>.
bravius edited a comment on issue #200:
URL: https://github.com/apache/incubator-age/issues/200#issuecomment-1069537668


   @pdpotter - I just had a look at the documentation:
   
   > Cypher uses a Postgres namespace for every individual graph. It is recommended that no DML or DDL commands are executed in the namespace that is reserved for the graph.
   
   https://age.apache.org/docs/master/intro/graphs.html
   
   This is what I'm confused about. If it's not recommended to use DML or DDL on a graph namespace, does that mean creating indexes like this is a no-no (I've run into the SET bug as well [#161](https://github.com/apache/incubator-age/issues/161) ):
   
   For example:
   
   `CREATE UNIQUE INDEX account_email_index ON account((tojsonb(properties)->'email'));`
   
   I just don't understand what the plan is for creating custom constraints and indexes.
   
   Given that the road map has announced a v1.0.0 release candidate for this month, solving the indexing and constraints issues seems fundamental.
   


-- 
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