diff --git a/IT/SQL/PostgreSQL/Upgrade.md b/IT/SQL/PostgreSQL/Upgrade.md index c905f6e..72e7c17 100644 --- a/IT/SQL/PostgreSQL/Upgrade.md +++ b/IT/SQL/PostgreSQL/Upgrade.md @@ -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); +``` \ No newline at end of file