Title: [BUG] JSQLParser : PostgreSQL : ORDER BY ... USING operator fails to parse · Issue #2925 · JSQLParser/JSqlParser · GitHub
Open Graph Title: [BUG] JSQLParser : PostgreSQL : ORDER BY ... USING operator fails to parse · Issue #2925 · JSQLParser/JSqlParser
X Title: [BUG] JSQLParser : PostgreSQL : ORDER BY ... USING operator fails to parse · Issue #2925 · JSQLParser/JSqlParser
Description: PostgreSQL supports ORDER BY expression USING operator in a sort item, where the operator is the less-than or greater-than member of a B-tree operator family. USING < is equivalent to ASC and USING > is equivalent to DESC (PostgreSQL doc...
Open Graph Description: PostgreSQL supports ORDER BY expression USING operator in a sort item, where the operator is the less-than or greater-than member of a B-tree operator family. USING < is equivalent to ASC and USING...
X Description: PostgreSQL supports ORDER BY expression USING operator in a sort item, where the operator is the less-than or greater-than member of a B-tree operator family. USING < is equivalent to ASC and US...
Opengraph URL: https://github.com/JSQLParser/JSqlParser/issues/2925
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] JSQLParser : PostgreSQL : ORDER BY ... USING operator fails to parse","articleBody":"PostgreSQL supports `ORDER BY expression USING operator` in a sort item, where the operator is the less-than or greater-than member of a B-tree operator family. `USING \u003c` is equivalent to `ASC` and `USING >` is equivalent to `DESC` ([PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-select.html#SQL-ORDERBY)).\n\nJSQLParser fails to parse this query.\n\n## SQL Example\n\n```sql\nCREATE TABLE t (a int, b int);\n\nINSERT INTO t (a, b) VALUES\n (1, 3), (1, 1), (1, 2), (2, 5), (NULL, 4), (NULL, 9);\n\nSELECT * FROM t ORDER BY a ASC NULLS LAST, b USING \u003c;\n```\n\nThis query executes successfully in PostgreSQL and returns:\n\n```text\n a | b\n---+---\n 1 | 1\n 1 | 2\n 1 | 3\n 2 | 5\n | 4\n | 9\n```\n\n# Parsing error\n\nJSQLParser throws the following exception:\n\n```text\nParseException: Encountered: \u003cK_USING> / \"USING\", at line 1, column 46, in lexical state DEFAULT.\nWas expecting one of these terminals within expansion starting at 4990:23:\n \u003cEOF> (inside 4990:23)\n \u003cST_SEMICOLON> (inside 4990:23) ...\n```\n\nThe error is reported at `USING`, immediately after the sort expression `b`.\n\nTested with JSQLParser `5.4`.","author":{"url":"https://github.com/tomershay","@type":"Person","name":"tomershay"},"datePublished":"2026-11-13T18:29:45Z","url":"https://github.com/JSQLParser/JSqlParser/issues/2925"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5aa6ee8c-15ff-49f9-f881-5fdcc0703dde |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA0:24E34C:D8DEF4:12FE5D4:6B043FF8 |
| html-safe-nonce | 718d54da033a117d7663f80cd73b03f78b91b824be4a94820a21842a746ec90c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUEwOjI0RTM0QzpEOERFRjQ6MTJGRTVENDo2QjA0M0ZGOCIsInZpc2l0b3JfaWQiOiI0MzA0NjQzOTU3ODk3NTc2NDQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9221aa8b93956d7c72586e58f4a327ee0721b89a40c50a0db83abfc45ba9d433 |
| hovercard-subject-tag | issue:6377551590 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSQLParser/JSqlParser/2925/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a737ecc26772301917513fcf94bc6489334fdd10341395a6137f2c90866be88/JSQLParser/JSqlParser/issues/2925 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a737ecc26772301917513fcf94bc6489334fdd10341395a6137f2c90866be88/JSQLParser/JSqlParser/issues/2925 |
| og:image:alt | PostgreSQL supports ORDER BY expression USING operator in a sort item, where the operator is the less-than or greater-than member of a B-tree operator family. USING < is equivalent to ASC and USING... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tomershay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git |
| octolytics-dimension-user_id | 4643847 |
| octolytics-dimension-user_login | JSQLParser |
| octolytics-dimension-repository_id | 1944709 |
| octolytics-dimension-repository_nwo | JSQLParser/JSqlParser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1944709 |
| octolytics-dimension-repository_network_root_nwo | JSQLParser/JSqlParser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width