pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Odd sort behaviour
Date: Tue, 01 Sep 2009 15:01:56 -0600
Message-ID: <4A9D8BC4.30906@gmail.com> (raw )
Since when does "." sort as "nothing at all"
This select
select
distinct u.user_name
from
subscriber_user u,
subscription s,
subscription_template t
where
u.id = s.subscriber_entity_id
and s.template_id = t.id
and t.application_id = (select id from application where
short_name ='books')
order by u.user_name
\p\g
over this table def.(for user_name)
\d subscriber_user
Table "public.subscriber_user"
+-----------------------+---------+---------------+
| Column | Type | Modifiers |
+-----------------------+---------+---------------+
| id | bigint | not null |
| last_name | text | |
| first_name | text | |
| user_name | text | |
| email_address | text | |
| force_password_change | boolean | default false |
| title | text | |
+-----------------------+---------+---------------+
Indexes:
"subscriber_user_pkey" PRIMARY KEY, btree (id)
"idx__subscriber_users__lower_email_address" UNIQUE, btree
(lower(email_address))
"idx__subscriber_users__lower_user_name" UNIQUE, btree
(lower(user_name))
Foreign-key constraints:
"subscriber_user_id_fkey" FOREIGN KEY (id) REFERENCES subscriber(id)
is producing this sorted??? output
| adrianohazim@hotmail.com |
| adx008@show.org.tw |
| aecheniq@mac.com |
| a.ecke70@gmx.de |
| aelefant@unina.it |
| aeo_tw@hotmail.com |
| a.fischedick@t-online.de |
| aflores3432@gmail.com |
| afried@advancedneurosurgeons.com |
| agave007@comcast.net |
| agelsinger@amirsys.com |
| agis1doc@yahoo.gr |
using this client
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
and this server
show server_version;
+----------------+
| server_version |
+----------------+
| 8.3.7 |
+----------------+
(1 row)
nsm=# show server_encoding
+-----------------+
| server_encoding |
+-----------------+
| UTF8 |
+-----------------+
(1 row)
view thread (6+ messages) latest in thread
Message-ID: <4A9D8BC4.30906@gmail.com>
Permalink: ../4A9D8BC4.30906@gmail.com/
Also on: postgresql.org/message-id/4A9D8BC4.30906@gmail.com
copy link · copy postgr.es
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-sql@postgresql.org
Cc: robjsargent@gmail.com
Subject: Re: Odd sort behaviour
In-Reply-To: <4A9D8BC4.30906@gmail.com>
* 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