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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to