pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Fernando Grijalba <fgrijalba@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Convert int to hex
Date: Thu, 02 Jun 2005 08:14:39 +0100
Message-ID: <429EB1DF.7060202@archonet.com> (raw)
In-Reply-To: <f817a44d050601134211d78731@mail.gmail.com>
References: <f817a44d050601134211d78731@mail.gmail.com>

Fernando Grijalba wrote:
> I want to be able to change an int4 from a sequence and store it as
> varchar in the database as a hex number.
> 
> Is this possible?

Try the to_hex() function - in the "Functions and operators" chapter of 
the manual - "Strings" section.

-- 
   Richard Huxton
   Archonet Ltd



view thread (4+ messages)  latest in thread

Message-ID: <429EB1DF.7060202@archonet.com>
Permalink:  ../429EB1DF.7060202@archonet.com/
Also on:    postgresql.org/message-id/429EB1DF.7060202@archonet.com

 · 

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: dev@archonet.com, fgrijalba@gmail.com
  Subject: Re: Convert int to hex
  In-Reply-To: <429EB1DF.7060202@archonet.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