0

As it says on the tin. I'm looking for something like Redis' INCR, except I also would like to then query for all the item where count is greater than 1.

I'm anticipating a 20-30 gigabytes of data, otherwise I'd just do it in-memory.

dsp_099
  • 5,801
  • 17
  • 72
  • 128

1 Answers1

0

You can use the PostgreSQL's Sequence:

CREATE SEQUENCE serial START 1;

SELECT nextval('sequence_name');

Also, take a look at this second answer: next available record id

Community
  • 1
  • 1
lcguida
  • 3,787
  • 2
  • 33
  • 56