Is PostgreSQL's Ltree module a good fit for threaded comments?

后端 未结 3 1904
时光说笑
时光说笑 2021-01-31 06:47

I\'m considering using PostgreSQL\'s Ltree module in my application to help with threaded comments. I\'ve been eying it for a while to use for threaded comments. I figure it w

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 07:15

    Version 8.4 of PostgreSQL will be bringing Common Table Expressions functionality into the core with WITH and WITH... RECURSIVE expressions. If you're modifying old code, you may want to wait until 8.4 is released, as then you won't have to worry about any incompatibilities between Ltree and the new core syntax. If you're working with old code, or do not want to wait for 8.4, you will probably want to make sure you write code that is easily translatable to the new syntax, especially if you're changing an old schema or designing a new one.

    See also:

    • The 8.4 manual entry on WITH queries and CTEs
    • A writeup with examples on the 8.4 implementation of CTEs

提交回复
热议问题