Semantic version type on PG 11.5 deployed on RDS. ltree?
You could use an array of integers e.g. version 1.2.3 would be array[1,2,3]. 

Such an array compares (and sorts) correctly. To format it as a string, you could write some simple functions. 

Parsing is simple as well: string_to_array('1.2.3', '.')::int[]