PostgreSQL next value of the sequences?

后端 未结 7 1806
天命终不由人
天命终不由人 2020-12-01 14:20

I am using PostgreSQL for my Codeigniter website. I am using grocery crud for add, edit and delete operations. While doing an edit or add, I want to rename an uploaded file

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 14:22

    Even if this can somehow be done it is a terrible idea since it would be possible to get a sequence that then gets used by another record!

    A much better idea is to save the record and then retrieve the sequence afterwards.

提交回复
热议问题