pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14064: Sort order of bytea, etc. not defined
3+ messages / 3 participants
[nested] [flat]

* BUG #14064: Sort order of bytea, etc. not defined
@ 2016-04-04 20:33 cpacejo@clearskydata.com
  2016-05-04 06:16 ` Re: BUG #14064: Sort order of bytea, etc. not defined Pavel Golub <pavel@microolap.com>
  0 siblings, 1 reply; 3+ messages in thread

From: cpacejo@clearskydata.com @ 2016-04-04 20:33 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14064
Logged by:          Chris Pacejo
Email address:      cpacejo@clearskydata.com
PostgreSQL version: 9.5.2
Operating system:   any
Description:        

The documentation does not define (nor call out as undefined) the sort order
of bytea, bit varying, and other sequence types.  While the bytea sort order
is unsurprising (a < b if a is a prefix of b, but b > a if a prefix of b >
the same length prefix of a), it is not the only such "unsurprising" sort
order, and it would be helpful to have the guarantee that this sort order
can be relied upon (especially in concert with range types).


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #14064: Sort order of bytea, etc. not defined
  2016-04-04 20:33 BUG #14064: Sort order of bytea, etc. not defined cpacejo@clearskydata.com
@ 2016-05-04 06:16 ` Pavel Golub <pavel@microolap.com>
  2016-05-04 12:09   ` Re: BUG #14064: Sort order of bytea, etc. not defined Chris Pacejo <cpacejo@clearskydata.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Pavel Golub @ 2016-05-04 06:16 UTC (permalink / raw)
  To: cpacejo@clearskydata.com; pgsql-bugs

Hello, Cpacejo.

You wrote:

ccc> The following bug has been logged on the website:

ccc> Bug reference:      14064
ccc> Logged by:          Chris Pacejo
ccc> Email address:      cpacejo@clearskydata.com
ccc> PostgreSQL version: 9.5.2
ccc> Operating system:   any
ccc> Description:        

ccc> The documentation does not define (nor call out as undefined) the sort order
ccc> of bytea, bit varying, and other sequence types.  While the bytea sort order
ccc> is unsurprising (a < b if a is a prefix of b, but b > a if a prefix of b >
ccc> the same length prefix of a), it is not the only such "unsurprising" sort
ccc> order, and it would be helpful to have the guarantee that this sort order
ccc> can be relied upon (especially in concert with range types).



You shouls use explicit type casting for such types.

-- 
With best wishes,
 Pavel                          mailto:pavel@gf.microolap.com



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #14064: Sort order of bytea, etc. not defined
  2016-04-04 20:33 BUG #14064: Sort order of bytea, etc. not defined cpacejo@clearskydata.com
  2016-05-04 06:16 ` Re: BUG #14064: Sort order of bytea, etc. not defined Pavel Golub <pavel@microolap.com>
@ 2016-05-04 12:09   ` Chris Pacejo <cpacejo@clearskydata.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Chris Pacejo @ 2016-05-04 12:09 UTC (permalink / raw)
  To: Pavel Golub <pavel@gf.microolap.com>; +Cc: pgsql-bugs

I'm not sure I understand? I know the data is bytea, how would casting it
to another type help? (I don't think casting bytea is even possible?)
On May 4, 2016 2:16 AM, "Pavel Golub" <pavel@microolap.com> wrote:

> Hello, Cpacejo.
>
> You wrote:
>
> ccc> The following bug has been logged on the website:
>
> ccc> Bug reference:      14064
> ccc> Logged by:          Chris Pacejo
> ccc> Email address:      cpacejo@clearskydata.com
> ccc> PostgreSQL version: 9.5.2
> ccc> Operating system:   any
> ccc> Description:
>
> ccc> The documentation does not define (nor call out as undefined) the
> sort order
> ccc> of bytea, bit varying, and other sequence types.  While the bytea
> sort order
> ccc> is unsurprising (a < b if a is a prefix of b, but b > a if a prefix
> of b >
> ccc> the same length prefix of a), it is not the only such "unsurprising"
> sort
> ccc> order, and it would be helpful to have the guarantee that this sort
> order
> ccc> can be relied upon (especially in concert with range types).
>
>
>
> You shouls use explicit type casting for such types.
>
> --
> With best wishes,
>  Pavel                          mailto:pavel@gf.microolap.com
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-05-04 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 20:33 BUG #14064: Sort order of bytea, etc. not defined cpacejo@clearskydata.com
2016-05-04 06:16 ` Pavel Golub <pavel@microolap.com>
2016-05-04 12:09   ` Chris Pacejo <cpacejo@clearskydata.com>

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