잠시만 기다려 주세요

     '이태원 150명 넘게 죽은 핼러윈 참사.. 오세훈 탄핵.. 윤석열 탄핵.... 행안부 장관 이상민은 사람이냐... 말만 하면 책임 회피..'
전체검색 :  
이번주 로또 및 연금번호 발생!!   |  HOME   |  여기는?   |  바다물때표   |  알림 (19)  |  여러가지 팁 (1095)  |  추천 및 재미 (163)  |  자료실 (28)  |  
시사, 이슈, 칼럼, 평론, 비평 (799)  |  끄적거림 (142)  |  문예 창작 (719)  |  바람 따라 (75)  |  시나리오 (760)  |  드라마 대본 (248)  |  
살인!


    postgresql

postgresql - postgresql 테이블을 비워도 시쿼스 SEQUENCE 가 리셋 reset 이 안될 때....
이 름 : 바다아이   |   조회수 : 10210         짧은 주소 : https://www.bada-ie.com/su/?361591824139
대부분 소유권 문제 혹은 해당 필드로 연결을 안 해 놓아서 입니다.
아래 처럼 시쿼스를 해당 테이블에 auto_increment 사용 할 필드에 연결해 주시면 되겠습니다.

ALTER SEQUENCE 시쿼스이름 OWNED BY 테이블이름.필드명

자 이제 다시 테이블 비우기를 해 보시면 정상적으로 시쿼스가 1부터 다시 시작되는 것을 알 수 있습니다.

TRUNCATE 테이블이름 RESTART IDENTITY;

만약 소유권 문제라면 소유권도 적절히 넘겨줍니다.

ALTER TABLE 시쿼스이름 OWNER TO 디비유저;

 
| |





      1 page / 2 page
번 호 카테고리 제 목 이름 조회수
45 postgresql postgresql ... postgresql 14 .. postgresql.conf port 5432 .. 바다아이 1838
44 postgresql , count(*) .... 바다아이 8503
43 postgresql How to do an update + join in PostgreSQL?, 바다아이 7780
42 postgresql sequence(퀀) 바다아이 10250
41 postgresql , , , index create, , 바다아이 10238
40 postgresql postgresql log_timezone .... 바다아이 8287
현재글 postgresql postgresql SEQUENCE reset .... 바다아이 10211
38 postgresql [PostgreSql] WITH , , Operator 바다아이 9426
37 postgresql postgresql for, foreach , 바다아이 11209
36 postgresql postgresql , , into ... 바다아이 11344
35 postgresql postgresql PL/pgSQL - SQL Procedural Language, , 바다아이 12923
34 postgresql postgresql ... .. , , 바다아이 14459
33 postgresql postgresql CSV export/import 바다아이 10583
32 postgresql postgresql tablespace , .... 바다아이 15801
31 postgresql postgresql 10 partitioning, ... , ... 바다아이 11128
30 postgresql Using PostgreSQL Arrays, ... ... 바다아이 11169
29 postgresql PostgreSQL (TRIGGER) (function) 바다아이 10728
28 postgresql Optimize and Improve PostgreSQL Performance with VACUUM, ANALYZE, and REINDEX 바다아이 11347
27 postgresql postgresql tuple . vacuumdb .. , . 바다아이 10935
26 postgresql postgresql , .. 바다아이 11143
25 postgresql postgresql , size, 바다아이 13065
24 postgresql postgresql , , .... 바다아이 9911
23 postgresql PostgreSQL Replication, , , master, slave 바다아이 13495
22 postgresql postgresql case 바다아이 9966
21 postgresql postgresql with 바다아이 10410
20 postgresql postgresql , , string 바다아이 14354
19 postgresql Postgresql partitioning table , , , 바다아이 10780
18 postgresql PostgreSQL 바다아이 12411
17 postgresql postgresql vacuumdb, psql, pg_dump password crontab , pgpass 바다아이 12393
16 postgresql postgresql sequence 퀀 auto_increment . 바다아이 11338
| |









Copyright ⓒ 2001.12. bada-ie.com. All rights reserved.
이 사이트는 리눅스에서 firefox 기준으로 작성되었습니다. 기타 브라우저에서는 다르게 보일 수 있습니다.
[ Ubuntu + GoLang + PostgreSQL + Mariadb ]
서버위치 : 오라클 클라우드 춘천  실행시간 : 0.23473
to webmaster... gogo sea. gogo sea.