add sequence part

This commit is contained in:
vincent 2021-04-19 10:45:07 +02:00
parent ade1932487
commit 5ae312fdad

View File

@ -26,3 +26,20 @@ pg_upgrade -b /opt/pgsql-PG_VERSION/bin -B /usr/bin -d /var/lib/postgres/olddata
```
- check both pg_hba.conf in new and old cluster
- restart server `sc-start postgresql`
# sequece manipulation
sequence are use to generate uniq identifier
- get sequence value
```SQL
select * from name_seq;
```
- increment sequence value
```SQL
select nextval(name_seq);
```
- set sequence value:
```SQL
select setval(name_seq,newvalue);
```