Hi Is there any method of clearing the serial numbering so that ID references can start afresh without rebuilding the database. Of I use postgresql as part of my application I would like to use pgdump to ensure that I have the latest version and starting the serial numbering at #1 would be a good thing. Bob
On Nov 14, 2007 5:17 PM, Bob Pawley <rjpawley@shaw.ca> wrote:
> Hi
>
> Is there any method of clearing the serial numbering so that ID references
> can start afresh without rebuilding the database.
>
> Of I use postgresql as part of my application I would like to use pgdump to
> ensure that I have the latest version and starting the serial numbering at
> #1 would be a good thing.
Look up setval(), currval() and nextval(), the sequence manipulation functions.
setval('seqname',1,true) will reset seqname back like new.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера