What does the "%%" in this statement mean?
SELECT nextval(seq_name) %% 1024 INTO seq_id;
And why does Postgres say, when I use it?
operator does not exist: bigint %% integer
Most probably, it's an artifact from translating dynamic SQL with format(), which requires to double % characters. Should be the modulo operator % if translated correctly, which also makes sense for a sharding solution or similar. Effectively, you get numbers cycling from 0 to 1023.
I suspect it's the same as we already dealt with here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With