pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: branko.radovanovic.zg@gmail.com
Subject: BUG #17853: COLLATE does not work with numeric column references in ORDER BY
Date: Sat, 18 Mar 2023 22:44:14 +0000
Message-ID: <17853-57fa4c939f613eb6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17853
Logged by:          Branko Radovanovic
Email address:      branko.radovanovic.zg@gmail.com
PostgreSQL version: 13.4
Operating system:   Debian
Description:        

The following SQL:

values ('a')
order by 1 collate "C";

...returns an error: SQL Error [42804]: ERROR: collations are not supported
by type integer

In the above query, "1" is not an integer but a column reference, so it
should be treated as well-formed and work the same as with the actual column
label:

values ('a')
order by column1 collate "C";

Best regards,
Branko



view thread (6+ messages)  latest in thread

Message-ID: <17853-57fa4c939f613eb6@postgresql.org>
Permalink:  ../17853-57fa4c939f613eb6@postgresql.org/
Also on:    postgresql.org/message-id/17853-57fa4c939f613eb6@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, branko.radovanovic.zg@gmail.com
  Subject: Re: BUG #17853: COLLATE does not work with numeric column references in ORDER BY
  In-Reply-To: <17853-57fa4c939f613eb6@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox