From: P <user2037@live.com>
To: pgsql-admin@postgresql.org
Subject: Quirks in Sorting Pg_description
Date: Wed, 03 Mar 2010 09:15:50 -0500
Message-ID: <BLU0-SMTP6181655A9EC3DB104B4AFFB43A0@phx.gbl> (raw)
The following query works from Psql's prompt but not from Psql's "-c"
command or from PHP's PDO interface.
SELECT description FROM pg_catalog.pg_description WHERE description
SIMILAR TO '\d+' ORDER BY description::integer DESC LIMIT 1;
The result should be the description with the highest integer value.
Instead it appears to be sorting like text even though it has been cast
to an integer.
Anyone know of a workaround?
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-admin@postgresql.org
Cc: user2037@live.com
Subject: Re: Quirks in Sorting Pg_description
In-Reply-To: <BLU0-SMTP6181655A9EC3DB104B4AFFB43A0@phx.gbl>
* 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