잠시만 기다려 주세요

     '바다아이 사이트는 윤석열 정부 탄핵을 지지합니다.'
전체검색 :  
이번주 로또 및 연금번호 발생!!   |  HOME   |  여기는?   |  바다물때표   |  알림 (19)  |  여러가지 팁 (1095)  |  추천 및 재미 (163)  |  자료실 (28)  |  
시사, 이슈, 칼럼, 평론, 비평 (801)  |  끄적거림 (142)  |  문예 창작 (719)  |  바람 따라 (75)  |  시나리오 (760)  |  드라마 대본 (248)  |  
살인!


    postgresql

postgresql - postgresql 테이블을 비워도 시쿼스 SEQUENCE 가 리셋 reset 이 안될 때....
이 름 : 바다아이   |   조회수 : 10245         짧은 주소 : 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 .. 바다아이 1862
44 postgresql , count(*) .... 바다아이 8537
43 postgresql How to do an update + join in PostgreSQL?, 바다아이 7819
42 postgresql sequence(퀀) 바다아이 10298
41 postgresql , , , index create, , 바다아이 10273
40 postgresql postgresql log_timezone .... 바다아이 8308
현재글 postgresql postgresql SEQUENCE reset .... 바다아이 10246
38 postgresql [PostgreSql] WITH , , Operator 바다아이 9467
37 postgresql postgresql for, foreach , 바다아이 11250
36 postgresql postgresql , , into ... 바다아이 11379
35 postgresql postgresql PL/pgSQL - SQL Procedural Language, , 바다아이 12954
34 postgresql postgresql ... .. , , 바다아이 14516
33 postgresql postgresql CSV export/import 바다아이 10618
32 postgresql postgresql tablespace , .... 바다아이 15842
31 postgresql postgresql 10 partitioning, ... , ... 바다아이 11161
30 postgresql Using PostgreSQL Arrays, ... ... 바다아이 11201
29 postgresql PostgreSQL (TRIGGER) (function) 바다아이 10756
28 postgresql Optimize and Improve PostgreSQL Performance with VACUUM, ANALYZE, and REINDEX 바다아이 11388
27 postgresql postgresql tuple . vacuumdb .. , . 바다아이 10974
26 postgresql postgresql , .. 바다아이 11177
25 postgresql postgresql , size, 바다아이 13095
24 postgresql postgresql , , .... 바다아이 9935
23 postgresql PostgreSQL Replication, , , master, slave 바다아이 13533
22 postgresql postgresql case 바다아이 10000
21 postgresql postgresql with 바다아이 10438
20 postgresql postgresql , , string 바다아이 14414
19 postgresql Postgresql partitioning table , , , 바다아이 10806
18 postgresql PostgreSQL 바다아이 12448
17 postgresql postgresql vacuumdb, psql, pg_dump password crontab , pgpass 바다아이 12430
16 postgresql postgresql sequence 퀀 auto_increment . 바다아이 11376
| |









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