Looking for alternatives to creating leading zeroes for record IDs numerical suffixes (i.e. the 00001 in CHI-TLD-00001). Currently pulling in the last record, splitting off the numerical component, converting text to number, incrementing, then a bunch of else-if logic to add the right number of zeros when turning it back into text, depending on the numerical value).
I’m hoping for a simple formatting expression trick, such as the TEXT(target, format) function in Excel…
I too wouldn’t mind the ability to choose to have serialized records during table creation. A good default since the underlying table is postgres would be serial8 datatype (bigserial + constraint + autoincrement).
That being said, if you’re depending on serialized records I would look at the architecture of your application. If there’s no way for the ID column to be meaningful, I use the random option in an expression when creating records just to ensure they’re unique.