How are topic IDs generated?

(Gabriel Tonon) #1

Are they created following a simple arithmetic pattern? Also, are they based for the entirety of an instance, or only personal accounts? I’m using the API and seeing some inconsistencies.

(Rafael dos Santos Silva) #2

It’s a PostgreSQL sequence. It increases +1 for every new topic.

(Gabriel Tonon) #3

Thanks for the quick response! Are they unique values across the entire Discourse instance or are they based on each individual user?

(Michael Howell) #4

They’re unique across the whole instance.