사용자 도구

사이트 도구


psql

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
psql [2019/10/02 02:22]
gsjung
psql [2021/04/13 06:54] (현재)
줄 36: 줄 36:
     for table in cur.fetchall():     for table in cur.fetchall():
         print(table)         print(table)
 +</code>
 +<code>
 +CREATE TABLE public.volunteer
 +(
 +    id SERIAL PRIMARY KEY,
 +    email character varying(100) COLLATE pg_catalog."default",
 +    password character varying(100) COLLATE pg_catalog."default" NOT NULL,
 +    name character varying(100) COLLATE pg_catalog."default" NOT NULL,    
 +    CONSTRAINT volunteer_email_key UNIQUE (email)
 +)
 +</code>
 +sqlalchemy
 +<code>
 +flask-sqlacodegen --flask --outfile tc.py "postgres://postgres: - -@c2s2.hanyang.ac.kr:5432/jaunt" --tables "tc_devices,volunteer"
 +</code>
 +<code>
 +$ git remote add upstream https://github.com/[Original Owner Username]/[Original Repository].git
 +$ git fetch upstream
 +$ git checkout master
 +$ git merge upstream/master
 +$ git push
 +</code>
 +<code>
 +First install the extension
 +
 +CREATE EXTENSION tsm_system_rows;
 +
 +Then your query,
 +
 +SELECT *
 +FROM table
 +TABLESAMPLE SYSTEM_ROWS(1000);
 </code> </code>
psql.1569982943.txt.gz · 마지막으로 수정됨: 2021/04/13 06:54 (바깥 편집)