From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: jack <datactrl@tpg.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to put an special code in a string
Date: Wed, 23 Apr 2003 06:56:45 -0700 (PDT)
Message-ID: <20030423135645.97679.qmail@web20808.mail.yahoo.com> (raw)
In-Reply-To: <3EA637B9.5060404@klaster.net>
--- Tomasz Myrta <jasiek@klaster.net> wrote:
> Uz.ytkownik jack napisa?:
> > Hi all,
> >
> > With pg/Sql, how do I put an special code in a
> string? Such as
> >
> > ''abc'' || <tab>||''xxx''||<cr/lf>
> >
> > How do I specify a tab or cr/lf code? Thank you
> C style should work. Try
> <tab> -> \t
> <cr/lf> -> \r\n ?
A generalized solution is to use the chr() function,
which can represent any ascii character, given the
decimal value as an argument.
So, <tab> is chr(9); <cr/lf> is chr(13) || chr(10)
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
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: jeff_eckermann@yahoo.com, datactrl@tpg.com.au
Subject: Re: how to put an special code in a string
In-Reply-To: <20030423135645.97679.qmail@web20808.mail.yahoo.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