could not determine data type of parameter $2

곽태욱·2023년 2월 5일
0

Before

SELECT *
FROM table1
WHERE column1 = $1
  AND (
    $2 IS NULL
    OR column2 = $2
  );

After

SELECT *
FROM table1
WHERE column1 = $1
  AND (
    $2::text IS NULL
    OR column2 = $2::text
  );
profile
이유와 방법을 알려주는 메모장 겸 블로그. 블로그 내용에 대한 토의나 질문은 언제나 환영합니다.

0개의 댓글