Обсуждение: reordering sequences

Поиск
Список
Период
Сортировка

reordering sequences

От
"mike"
Дата:
is it at all possiable to reorder a squence? I'm finding that our sequences get some what out step and messed and would like to ocassionaly reorder them, though I'm unable to find anything that might be able to do this.
 
Mike

Re: reordering sequences

От
"Gregory Wood"
Дата:
> is it at all possiable to reorder a squence? I'm finding that our
sequences get some what out step and messed and would like to ocassionaly
reorder them, though I'm unable to find anything that might be able to do
this.

BEGIN;
SELECT setval('MyTable_MySeq_SEQ',1);
UPDATE MyTable SET MySeq=nextval('MyTable_MySeq_SEQ');
COMMIT;

Of course this will screw up any foreign keys that you have that don't have
an ON UPDATE CASCADE set on them. Also, this is not guaranteed to preserve
the current sequence order, if that's important to you.

Greg


interpretting pgsql log messages

От
Ryan Mahoney
Дата:
In my logs, I find a lot of these:

    NOTICE:  current transaction is aborted, queries ignored until end of
transaction block

should I be concerned?  Is there a place where I can read about the
difference messages that may appear in the log file?

Thanks!

- Ryan Mahoney
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01