SELECT CAST(123 AS char) -> 1

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SELECT CAST(123 AS char) -> 1
Date: 2008-02-12 05:36:49
Message-ID: 47B13071.3090802@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

For sake of interoperability (and using an API that requires String-type
hashtable keys), I'm trying to find a single CAST (int -> var/char)
syntax that works between the most databases. Only char seems to be a
candidate, but in 8.3 casting from an integer outputs only the first char...

Is this a bug, or would someone like to horrify me by stating something
like "spec says this is correct". :-)

I noticed this is also occurring on date/time types though that's not my
need/concern.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shwe Yee Than 2008-02-12 05:52:00 Problem in using C API - libpq
Previous Message INDIANNIC-HOSTING 2008-02-12 03:19:49 WINDOWS INSTALLATION TIPS