같은건가?

 

[링크 : https://loveiskey.tistory.com/80]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

order by group by  (0) 2019.08.26
postgresql 정규 표현식 검색  (0) 2019.08.26
pgadmin 에서 table 생성 SQL문 얻기  (0) 2019.08.20
sql substring  (0) 2019.08.16
sql 문자를 숫자로 정렬하기  (0) 2019.08.16
Posted by 구차니

database에서 우클릭후 backup 에서 schema only 로 하면

해당 데이터베이스에 있는 모든 schema, table들의 생성용 SQL이 생성된다.

 

[링크 : https://stackoverflow.com/questions/28716760/]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql 정규 표현식 검색  (0) 2019.08.26
sql ||과 concat()  (0) 2019.08.22
sql substring  (0) 2019.08.16
sql 문자를 숫자로 정렬하기  (0) 2019.08.16
postgresql 상속  (0) 2019.08.16
Posted by 구차니

정규표현식으로 원하는걸 잘라내려고 했는데

regexp_match 는 {}로 쌓버려서 귀찮아서 다른 방법 찾음

 

[링크 : https://codeday.me/ko/qa/20190414/329095.html]

Posted by 구차니

 

order by cast(number_string as bigint)

[링크 : https://beone.tistory.com/272]

Posted by 구차니

테이블 상속하니..

하위에서 값을 넣으니 부모에게도 그 값이 들어가는데

sequence는 안건드리니까 부모쪽 sequence는 증가되지 않는다.

 

아무튼.. pgadmin에서 상속하니 테이블 형상이 끌려와서

그냥 상속처럼 테이블 모양 끌어온다는 건가 해서 썼는데 그게 아니라 깜놀 -_-

 

[링크 : https://corekms.tistory.com/entry/table-inheritance상속]

Posted by 구차니

말이 복잡하네

insert into table select field from table

시에 insert 값으로 특정 상수를 넣는 방법인데..

해보니 걍.. insert into 안에 'fixed string' 식으로 항목하나 넣어주면 된다.

 

 

[링크 : https://stackoverflow.com/questions/30809384/combining-insert-select-with-constants/30809406]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

sql 문자를 숫자로 정렬하기  (0) 2019.08.16
postgresql 상속  (0) 2019.08.16
pgadmin 초기 시작시 브라우저 선택  (0) 2019.08.15
postgres sequence - auto increment  (0) 2019.08.13
postgresql 변수 타입  (0) 2019.08.12
Posted by 구차니

취향상의 문제(?)로 윈도우에서는 기본 브라우저를 chrome으로 설정하지 않는데

이래저래 pgadmin 실행시 edge로 띄우는것도 불편해서 설정을 찾는중

 

[링크 : https://stackoverflow.com/questions/50435656/pgadmin-4-always-open-in-browser-not-as-a-standalone-desktop-application/52905092]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql 상속  (0) 2019.08.16
sql 테이블에 검색한 값을 넣을때 고정값도 넣기  (0) 2019.08.16
postgres sequence - auto increment  (0) 2019.08.13
postgresql 변수 타입  (0) 2019.08.12
postgres 문자열 타입  (0) 2019.08.09
Posted by 구차니

자.. 어떻게 설계할까...

[링크 : https://akaisun.tistory.com/52]

 

+

2019.08.15

당연하지만(?) schema 식별자가 public이 아니면 넣어주어야 한다.

[링크 : https://www.postgresdba.com/bbs/board.php?bo_table=B10&wr_id=28]

Posted by 구차니

bigint(int8) 64bit

interger(int, int4) 32bit

double precision(float8 = 64bit)

real(float4 = 32bit)

 

[링크 : https://www.postgresql.org/docs/9.2/datatype.html]

 

JSON 변수 타입 접근 연산자

-> (JSON object or array)

->> (stringigy?)

tablename->'json_key'->'json_key'

[링크 : https://blog.outsider.ne.kr/1061]

Posted by 구차니

유틸리티 쓰니 text로 생성하고

기존에 다른 사람이 생성한걸 보니 character varying으로 많이 해놔서 타입을 보니.

 

text = varchar (무제한)

char = char (고정 길이)

varchar = character varying (길이 제한)

 

타입자체가 성능에 영향을 미치지는 않는다는데.. 어느게 나으려나 고민할 필요도 없는건가..

Different from other database systems, in PostgreSQL, there is no performance difference among three character types. In most situation, you should use text or varchar, and varchar(n) if you want PostgreSQL to check for the length limit.

[링크 : http://www.postgresqltutorial.com/postgresql-char-varchar-text/]

[링크 : https://codeday.me/ko/qa/20190305/2011.html]

 

 

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgres sequence - auto increment  (0) 2019.08.13
postgresql 변수 타입  (0) 2019.08.12
postgresql - 테이블 형상 보기  (0) 2019.08.08
psql 테이블 목록보기  (0) 2019.08.08
pgfutter  (0) 2019.08.06
Posted by 구차니