Cannot paste long query into psql
Discord username (optional)
No response
Describe the bug
I cannot paste any long query into psql when using Warp. Any long query got mangled into gibberish and doesn't work when I press enter at all. This is specific to Warp because I still can do it in iTerm
To reproduce
Simply start a new psql and paste this query into it with "CMD-V"
SELECT
e.employee_id AS "Employee #"
, e.first_name || ' ' || e.last_name AS "Name"
, e.email AS "Email"
, e.phone_number AS "Phone"
, TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
, TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date, 'MM/DD/YYYY') || ' to ' || TO_CHAR(jh.end_date, 'MM/DD/YYYY') ||
' as ' || jj.job_title || ' in ' || dd.department_name || ' department' AS "History Job Title"
FROM employees e
-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current manager_id
LEFT JOIN employees m
ON e.manager_id = m.employee_id
-- to get name of current department_id
LEFT JOIN departments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and can be equal to the employee itself)
LEFT JOIN employees dm
ON d.manager_id = dm.employee_id
-- to get name of location
LEFT JOIN locations l
ON d.location_id = l.location_id
LEFT JOIN countries c
ON l.country_id = c.country_id
LEFT JOIN regions r
ON c.region_id = r.region_id
-- to get job history of employee
LEFT JOIN job_history jh
ON e.employee_id = jh.employee_id
-- to get title of job history job_id
LEFT JOIN jobs jj
ON jj.job_id = jh.job_id
-- to get namee of department from job history
LEFT JOIN departments dd
ON dd.department_id = jh.department_id
ORDER BY e.employee_id;
Copied command output
psql -d hdev
psql (14.3, server 15.3 (Homebrew))
WARNING: psql major version 14, server major version 15.
Some psql features might not work.
Type "help" for help.
hdev=# SELECT
hdev-# e.employee_id AS "Employee #"
, e.first_name || ' ' || e.last_name AS "Name"
, e.email AS "Email"
, e.phone_number AS "Phone"
, TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
, TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' hdev-# , e.first_name || ' ' || e.last_name AS "Name"
, e.email AS "Email"
, e.phone_number AS "Phone"
, TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
, TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.starhdev-# , e.email AS "Email"
hdev-# , e.phone_number AS "Phone"
, TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
, TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked , e.phone_number AS "Phone"
, TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
, TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' |hdev-# , TO_CHAR(e.hire_date, 'MM/DD/YYYY') AS "Hire Date"
hdev-# , TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , TO_CHAR(e.salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Salary"
, e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of chdev-# , e.commission_pct AS "Comission %"
, 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mahdev-# , 'works as ' || j.job_title || ' in ' || d.department_name || ' department (manager: '
|| dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
, TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get namhdev-# || dm.first_name || ' ' || dm.last_name || ') and immediate supervisor: ' || m.first_name || ' ' || m.last_name AS "Current Job"
hdev-# , TO_CHAR(j.min_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') || ' - ' ||
hdev-# TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current TO_CHAR(j.max_salary, 'L99G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,'' NLS_CURRENCY = ''$''') AS "Current Salary"
, l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current managerge-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager anhdev-# , l.street_address || ', ' || l.postal_code || ', ' || l.city || ', ' || l.state_province || ', '
|| c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current managerge-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (unt-- (not equal to current manager and -- (not equal to current manager and -- (not equal to chdev-# || c.country_name || ' (' || r.region_name || ')' AS "Location"
, jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current managerge-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (unt-- (not equal to current manager and -- (not equal to current manager and -- (not equal to currey of-- (not equal to current manager and -- (not equal to currenthdev-# , jh.job_id AS "History Job ID"
, 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
JOIN jobs j
ON e.job_id = j.job_id
-- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
ON d.department_id = e.department_id
-- to get name of manager of current department
-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current managerge-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (unt-- (not equal to current manager and -- (not equal to current manager and -- (not equal to currey of-- (not equal to current manager and -- (not equal to current .emplo-- (not equal to current manhdev-# , 'worked from ' || TO_CHAR(jh.start_date , 'worked from ' || TO_CHARTO_ , 'worked from ' || TO_CHAR(jh.start_date , | , 'worked from ' n ' , 'worked from ' || TO_CHdep , 'worked from ' || TO_CHAR(jh.start_date , 'work-- to get title of current job_id
hdev(# JOIN jobs j
hdev(# ON e.job_id = j.job_id
hdev(# -- to get name of current mana-- to get name of current mana-- to ON-- to get name of current mana-- to get name of current mana-- to ON-- to get name of cuments d
hdev(# ON d.department_id = e.department_id
hdev(# -- to get name of manager of current department
hdev(# -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (not equal to current managerge-- (not equal to current manager and -- (not equal to current manager and -- (not equal to current manager and -- (unt-- (not equal to current manager and -- (not equal to current manager and -- (not equal to currey of-- (not equal to current manager and -- (not equal to current .emplo-- (not equal to current manageistory job_id
hdev(# LEFT JOIN jobs jj
hdev(# ON jj.job_id = jh.job_id
hdev(# -- to get namee of department from job history
hdev(# LEFT JOIN departments dd
hdev(# ON dd.department_id = jh.department_id
hdev(#
hdev(# ORDER BY e.employee_id;
Expected behavior
It should've worked like in iTerm https://github.com/warpdotdev/Warp/assets/17341000/9a82aeb9-0783-400a-b793-e2771fbb0378
Screenshots
What it looks like now. https://github.com/warpdotdev/Warp/assets/17341000/b8958b2d-334b-44f6-a535-2da3c7a74b1b
Operating system
MacOS
Operating system and version
Ventura 13.4.1
Shell Version
zsh 5.9 (x86_64-apple-darwin21.3.0)
Current Warp version
v0.2023.08.29.08.04.stable_00
Regression
No, this bug or issue has existed throughout my experience using Warp
Recent working Warp date
No response
Additional context
No response
Does this block you from using Warp daily?
Yes, this issue prevents me from using Warp daily.
Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)
Yes, this I confirmed this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e
None
@danhuynhdev thanks for opening this gonna mention it to the team
Just curious about which version of postgres you're using and if possible which method did you use to install it? I tried homebrew install of postgres v14.9 and wasn't able to fully replicate the issue but did notice some issue with pasting long query.
I installed it will brew install libpg (x86)
It looks like we're still awaiting more information on this issue. If the problem is still happening on the latest version of Warp, please share an update with any relevant logs, screenshots, or a short video.
If there's no activity on this issue after 3 business days, we'll close it out to help keep the issue tracker clean.
This is part of an automated backlog review and may be inaccurate. If you believe this assessment is wrong, please let us know.