잠시만 기다려 주세요

     '대한민국이 더이상 발전하지 못하는 것은 부패한 언론들의 쓰레기짓 때문이다.'
전체검색 :  
이번주 로또 및 연금번호 발생!!   |  HOME   |  여기는?   |  바다물때표   |  알림 (19)  |  여러가지 팁 (1095)  |  추천 및 재미 (163)  |  자료실 (28)  |  
시사, 이슈, 칼럼, 평론, 비평 (798)  |  끄적거림 (142)  |  문예 창작 (719)  |  바람 따라 (75)  |  시나리오 (760)  |  드라마 대본 (248)  |  
살인!


    postgresql

postgresql - postgresql 테이블을 비워도 시쿼스 SEQUENCE 가 리셋 reset 이 안될 때....
이 름 : 바다아이   |   조회수 : 10208         짧은 주소 : 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 .. 바다아이 1837
44 postgresql , count(*) .... 바다아이 8503
43 postgresql How to do an update + join in PostgreSQL?, 바다아이 7779
42 postgresql sequence(퀀) 바다아이 10249
41 postgresql , , , index create, , 바다아이 10238
40 postgresql postgresql log_timezone .... 바다아이 8287
현재글 postgresql postgresql SEQUENCE reset .... 바다아이 10209
38 postgresql [PostgreSql] WITH , , Operator 바다아이 9422
37 postgresql postgresql for, foreach , 바다아이 11206
36 postgresql postgresql , , into ... 바다아이 11344
35 postgresql postgresql PL/pgSQL - SQL Procedural Language, , 바다아이 12920
34 postgresql postgresql ... .. , , 바다아이 14459
33 postgresql postgresql CSV export/import 바다아이 10579
32 postgresql postgresql tablespace , .... 바다아이 15800
31 postgresql postgresql 10 partitioning, ... , ... 바다아이 11125
30 postgresql Using PostgreSQL Arrays, ... ... 바다아이 11167
29 postgresql PostgreSQL (TRIGGER) (function) 바다아이 10726
28 postgresql Optimize and Improve PostgreSQL Performance with VACUUM, ANALYZE, and REINDEX 바다아이 11346
27 postgresql postgresql tuple . vacuumdb .. , . 바다아이 10929
26 postgresql postgresql , .. 바다아이 11139
25 postgresql postgresql , size, 바다아이 13065
24 postgresql postgresql , , .... 바다아이 9910
23 postgresql PostgreSQL Replication, , , master, slave 바다아이 13494
22 postgresql postgresql case 바다아이 9965
21 postgresql postgresql with 바다아이 10410
20 postgresql postgresql , , string 바다아이 14354
19 postgresql Postgresql partitioning table , , , 바다아이 10779
18 postgresql PostgreSQL 바다아이 12410
17 postgresql postgresql vacuumdb, psql, pg_dump password crontab , pgpass 바다아이 12392
16 postgresql postgresql sequence 퀀 auto_increment . 바다아이 11338
| |









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