잠시만 기다려 주세요

     '시장이나 돌면서 가짜 민생 외치는 이재명을 규탄한다. 싸우지 않을 거면 내려와라... 야당대표는 당신의 방탄이나 하는 자리가 아니다.'
전체검색 :  
이번주 로또 및 연금번호 발생!!   |  HOME   |  여기는?   |  바다물때표   |  알림 (19)  |  여러가지 팁 (1095)  |  추천 및 재미 (163)  |  자료실 (28)  |  
시사, 이슈, 칼럼, 평론, 비평 (799)  |  끄적거림 (142)  |  문예 창작 (719)  |  바람 따라 (75)  |  시나리오 (760)  |  드라마 대본 (248)  |  
살인!


    postgresql

postgresql - postgresql 테이블을 비워도 시쿼스 SEQUENCE 가 리셋 reset 이 안될 때....
이 름 : 바다아이   |   조회수 : 10220         짧은 주소 : 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 .. 바다아이 1848
44 postgresql , count(*) .... 바다아이 8515
43 postgresql How to do an update + join in PostgreSQL?, 바다아이 7789
42 postgresql sequence(퀀) 바다아이 10257
41 postgresql , , , index create, , 바다아이 10246
40 postgresql postgresql log_timezone .... 바다아이 8293
현재글 postgresql postgresql SEQUENCE reset .... 바다아이 10221
38 postgresql [PostgreSql] WITH , , Operator 바다아이 9436
37 postgresql postgresql for, foreach , 바다아이 11219
36 postgresql postgresql , , into ... 바다아이 11352
35 postgresql postgresql PL/pgSQL - SQL Procedural Language, , 바다아이 12928
34 postgresql postgresql ... .. , , 바다아이 14466
33 postgresql postgresql CSV export/import 바다아이 10595
32 postgresql postgresql tablespace , .... 바다아이 15810
31 postgresql postgresql 10 partitioning, ... , ... 바다아이 11137
30 postgresql Using PostgreSQL Arrays, ... ... 바다아이 11174
29 postgresql PostgreSQL (TRIGGER) (function) 바다아이 10736
28 postgresql Optimize and Improve PostgreSQL Performance with VACUUM, ANALYZE, and REINDEX 바다아이 11355
27 postgresql postgresql tuple . vacuumdb .. , . 바다아이 10947
26 postgresql postgresql , .. 바다아이 11150
25 postgresql postgresql , size, 바다아이 13071
24 postgresql postgresql , , .... 바다아이 9915
23 postgresql PostgreSQL Replication, , , master, slave 바다아이 13504
22 postgresql postgresql case 바다아이 9972
21 postgresql postgresql with 바다아이 10418
20 postgresql postgresql , , string 바다아이 14361
19 postgresql Postgresql partitioning table , , , 바다아이 10786
18 postgresql PostgreSQL 바다아이 12423
17 postgresql postgresql vacuumdb, psql, pg_dump password crontab , pgpass 바다아이 12401
16 postgresql postgresql sequence 퀀 auto_increment . 바다아이 11343
| |









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