pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yudie <yudie@axiontech.com>
To: pgsql-sql@postgresql.org
Subject: Format Function
Date: Mon, 17 Feb 2003 14:56:01 -0600
Message-ID: <009c01c2d6c6$fb985b90$8401a8c0@yudie> (raw)

Hi,
Is there any default function for formating string in postgre sql?
for instance:
Format('123ABCDE', '####-###-###') => '12-3AB-CDE'

The closest function I know is the to_char() function but it only works for numbers

please advise

Thanks
Yude

view thread (3+ messages)  latest in thread

Message-ID: <009c01c2d6c6$fb985b90$8401a8c0@yudie>
Permalink:  ../009c01c2d6c6$fb985b90$8401a8c0@yudie/
Also on:    postgresql.org/message-id/009c01c2d6c6$fb985b90$8401a8c0@yudie

 · 

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: yudie@axiontech.com
  Subject: Re: Format Function
  In-Reply-To: <009c01c2d6c6$fb985b90$8401a8c0@yudie>

* 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