You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by GitBox <gi...@apache.org> on 2022/03/08 06:31:11 UTC
[GitHub] [incubator-age] emotionbug opened a new pull request #193: Remove OIDS from `ag_graph`
emotionbug opened a new pull request #193:
URL: https://github.com/apache/incubator-age/pull/193
Since then, the PostgreSQL version does not recommend the use of Oids, so remove Oids.
Since Oid uses 4Byte, it uses INT (SERIAL) type for compatibility. The SERIAL type generates a sequence of "$TABLE_NAME$_$COLUMN_NAME$_seq" and calls it to create a new ID.
And, the SERIAL type is the same as the INT type, but due to the rule that a value less than 1 cannot exist, the case where it does not exist is considered 0 (INVALID_AG_GRAPH_ID).
Upgrade script
```
ALTER TABLE ag_graph ADD COLUMN id SERIAL PRIMARY KEY, ADD COLUMN _name name, ADD COLUMN _namespace regnamespace;
UPDATE ag_graph SET _name=name, _namespace=namespace;
ALTER TABLE ag_graph DROP COLUMN name, DROP COLUMN namespace;
ALTER TABLE ag_graph RENAME COLUMN _name TO name, RENAME COLUMN _namespace TO namespace;
ALTER TABLE ag_graph ALTER COLUMN name SET NOT NULL, ALTER COLUMN namespace SET NOT NULL;
```
--
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: commits-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-age] emotionbug closed pull request #193: Remove OIDS from `ag_graph`
Posted by GitBox <gi...@apache.org>.
emotionbug closed pull request #193:
URL: https://github.com/apache/incubator-age/pull/193
--
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: commits-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org