Cannot paste long query into psql
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
No source file or test is named. Start by reproducing the provided long SQL paste in a new Warp session with psql, then compare the input with the iTerm result. Done means long queries paste without mangling and can be submitted successfully in Warp.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Rust
- Stars
- 65.1k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from warpdotdev/warp
-
area:agent area:window-tabs-panes enhancement needs-info os:mac repro:high triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
warpdotdev/warp#15768 · 3 comments · 1 reaction ·
-
bug factory-auto-implement factory:revops-factory os:mac ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 1/5 Under an hour Newbie friendliness 90/100
warpdotdev/warp#15697 · 2 comments ·
-
area:editor-notebooks bug repro:high triaged warp:auto-triage-review warp:tracking
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
warpdotdev/warp#13949 · 3 comments ·
-
markdown_parser: unclosed `<u>` markers pair via the emphasis algorithm and delete surrounding text Openarea:editor-notebooks bug ready-to-implement repro:high triaged warp:auto-triage-review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
warpdotdev/warp#12863 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
warpdotdev/warp#11969 · 2 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100