select로 추려낸 결과를 다른 select - where 문에서 쓰기 위한 방법

 

[링크 : https://stackoverflow.com/questions/1136380/sql-where-in-clause-multiple-columns]

 

+

2019.10.04

라는데.. 굳이 이걸 써야 하나 싶긴하네

select * from where (val1_upper, val2_upper) in (select val1,val2 from something)

Posted by 구차니

temporary file leak: File 4 still referenced

 

아.. 먼가 불안한 경고다.. 

일단 급한건 아니니 나중에 봐야지..

 

[링크 : https://dba.stackexchange.com/questions/112079/slow-query-performance-due-to-temporary-file]

Posted by 구차니

regexp_matches()는 여러개가 매칭될수 있어서 array()로 리턴하는데

{} 로 쌓여 있어서 그걸 벗기기 위해서는 unnest()를 하는게 가장 간단한데..

 

select 까진 문제없으나..

udpate 시에는 multiple row가 나올 녀석은 아예 배제가 되니 주의

 

[링크 : https://stackoverflow.com/questions/10593400/remove-braces-from-regular-expression-result]

Posted by 구차니
Programming/xml2019. 9. 29. 23:03

boolean() 으로 특정 element를 조회하면 될 듯?

 

[링크 : https://stackoverflow.com/questions/5689966/how-to-check-if-an-element-exists-in-the-xml-using-xpath]

 

+

2019.12.17

옛날 글이라 그런가 링크가 깨졌네

The boolean function converts its argument to a boolean as follows:

  • a number is true if and only if it is neither positive or negative zero nor NaN

  • a node-set is true if and only if it is non-empty

  • a string is true if and only if its length is non-zero

  • an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type

[링크 : https://stackoverflow.com/questions/5689966/how-to-check-if-an-element-exists-in-the-xml-using-xpath]

[링크 : http://www.w3.org/TR/xpath/#function-boolean] << 옛날 링크

 

Rules

The function computes the effective boolean value of a sequence, defined according to the following rules. See also Section 2.4.3 Effective Boolean Value XP31.

  • If $arg is the empty sequence, fn:boolean returns false.

  • If $arg is a sequence whose first item is a node, fn:boolean returns true.

  • If $arg is a singleton value of type xs:boolean or a derived from xs:boolean, fn:boolean returns $arg.

  • If $arg is a singleton value of type xs:string or a type derived from xs:string, xs:anyURI or a type derived from xs:anyURI, or xs:untypedAtomic, fn:boolean returns false if the operand value has zero length; otherwise it returns true.

  • If $arg is a singleton value of any numeric type or a type derived from a numeric type, fn:boolean returns false if the operand value is NaN or is numerically equal to zero; otherwise it returns true.

[링크 : https://www.w3.org/TR/xpath-functions-31/#func-boolean] << 새로운 링크?

 

'Programming > xml' 카테고리의 다른 글

XML DOM과 SAX  (0) 2019.12.01
xpath 복수개의 attribute 동시에 만족하는 항목 찾기  (0) 2019.09.14
xsd minOccurs, maxOccurs  (0) 2019.09.11
xpath count()  (0) 2019.09.09
xpath xsi  (0) 2019.08.12
Posted by 구차니

unnest를 사용하니 ,로 구분된 리스트를 여러개의 열로 나눌수 있었다.

string_to_array()의 반대 개념이라고 하면 되려나?

 

regexp_split_to_table() 도 사용할 수 있으나 regexp의 cost가 비싼 편이라 추천은 안하는 듯

[링크 : https://stackoverflow.com/questions/29419993/split-column-into-multiple-rows-in-postgres]

  [링크 : https://www.postgresql.org/docs/current/functions-string.html#FUNCTIONS-STRING-OTHER]

 

+

예제에 따라 다르지만 select에서 써도 되고 from에서 lateral join으로 구현해도 되고

어느게 cost가 낮을려나?

[링크 : https://www.postgresql.org/docs/9.2/functions-array.html]

[링크 : https://wwwi.tistory.com/350]

 

+

 

Posted by 구차니

 

The operator ~~ is equivalent to LIKE, and ~~* corresponds to ILIKE. There are also !~~ and !~~* operators that represent NOT LIKE and NOT ILIKE, respectively. All of these operators are PostgreSQL-specific.

[링크 : https://www.postgresql.org/docs/9.3/functions-matching.html]

 

SQL> select * from test where x ~ '[0-9]+';  -- "~" 는 "similar to" 의미입니다.

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

Posted by 구차니
개소리 왈왈/컴퓨터2019. 9. 28. 19:15

집에서 잠들어 있던 USB 허브용 5V 1A 짜리 어댑터가 마침 사이즈가 맞아서

추가 비용없이 살릴순 있는데.. 켜보니까 openSUSE가 설치되어 있고

원래꺼가 아니라 추가로 설치했는지 패스워드가 회사꺼네? ㅋㅋ

 

아무튼.. 터치도 안되고 버튼들은 먹는거 같지만 반응도 느리고

무선랜도 안되는것 같고 손볼게 좀 많아 보인다.

 

일단 왼쪽의 방향키와 MENU OK는 인식이 된다.

방향키 클릭은 인식을 안하네? 엔터로 인식할 줄 알았는데

MENU는 윈도우 키로 인식되는 것 같고 OK는 엔터 C는 우클릭 같다.

그 외에는 아직 모르겠고 우측 상단의 볼륨도 인식된다.

 

60 GB 1.8 인치 ZIF PATA HDD

리뷰안 SSD 1.8인치 ZIF 있으니 머.. 교체 하면 된다고 하더라도...

 

결정적으로.. 800x600이라는 함정이.. 크흑..

1024x600만 되어도 먼가 좀 비벼볼려 했는데 키보드도 없는데다가 해상도도 구려서 고민이네

 

+

스펙표 상으로는 1024x600 인데?

[링크 : https://funfunhan.com/2472800]

 

+

드라이버라도 깔아봐야지 머..

[링크 : https://forum.xda-developers.com/showthread.php?t=1598207]

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

U1010에 우분투 깔기..  (0) 2019.10.18
물욕비용 만원. 성공적?  (6) 2019.10.07
계륵과 딜레마  (4) 2019.09.27
암만 생각해도 바보짓인데... U1010  (2) 2019.09.24
z68 보트 메모리 슬롯 불량?  (0) 2019.09.22
Posted by 구차니
개소리 왈왈/컴퓨터2019. 9. 27. 10:05

빌립 S5

어댑터 6500원(집에 굴러 다니는 USB 허브 어댑터랑 같은 규격이면 안사도 될 듯)

배터리 2.7만 근처

1.8" PATA ZIF HDD

[링크 : https://www.ppomppoo.com/38]

 

U1010

어댑터 1.5만 (16V 3.75A라.. LG꺼랑 커넥터는 맞는데 19V라 큭...)

배터리 못 찾음(알리바바는 있는데 직구라는 벽이)

1.8" PATA CF HDD

[링크 : http://tpholic.com/xe/?mid=ibmqna&page=3&document_srl=12089262]

[링크 : http://shopping.interpark.com/product/productInfo.do?prdNo=153424427]

 

아무튼.. 리눅스  터미널로 쓰기에는 U1010이 제격인데

현실적인 비용이나 여러가지를 고려하기에는(배터리라던가..) S5 살리는게 이득

근데.. 리눅스 터미널이라 키보드 없으니 S5는 다시 계륵..

 

아.. 이쁜 똥, 이쁜 쓰레기 ㅠㅠ

왜 내 손에 들어와서 난리니 ㅠㅠ

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

물욕비용 만원. 성공적?  (6) 2019.10.07
viliv S5 i-LOG  (2) 2019.09.28
암만 생각해도 바보짓인데... U1010  (2) 2019.09.24
z68 보트 메모리 슬롯 불량?  (0) 2019.09.22
ADATA SSD toolbox  (0) 2019.07.14
Posted by 구차니

테이블 하나의 값을 바꿔치기하는데 특정 조건에 맞게 넣는방법

근데.. 특이하게도.. postgresql에서 순서가 뒤죽박죽이 된다..

recored가 원래 1부터 100까지 순서대로 나왔는데

update table set colname = 

case when condition then val1;

end;

이렇게 돌리니

 

뒤죽박죽으로 나온다. 실행 정책인가?

 

[링크 : https://blog.naver.com/50after/220930638267]

Posted by 구차니
Programming/Java(Spring)2019. 9. 26. 19:04

기본값은 body size 1MB 라고 한다.

그런 이유로 용량이 큰 걸 받아오면 잘리는 듯..

(특이하게 닫는 태그는 알아서 생성되는 것으로 보인다)

 

[링크 : https://stackoverflow.com/questions/36721635/why-jsoup-does-not-read-all-the-elements-of-the-page]

[링크 : https://jsoup.org/apidocs/org/jsoup/Connection.html#maxBodySize-int-]

 

+

크롬에서 200KB 래서 방심했는데.. gzip으로 압축되서 온게 그 용량

실제로는 2.5MB 이런식으로 크게 와서 body 크기가 1MB에 제한되서 잘린듯..

'Programming > Java(Spring)' 카테고리의 다른 글

spring 다시 시작  (0) 2020.01.15
spring boot 어플리케이션 로그 0:0:0:0:0:0:0:1  (0) 2020.01.13
java 메모리 관련...2?  (0) 2019.07.06
java.lang.OutOfMemoryError: GC overhead limit exceeded  (1) 2019.07.06
mvn -P profile  (0) 2019.06.08
Posted by 구차니