Re: how to put an special code in a string - Mailing list pgsql-sql

From Jeff Eckermann
Subject Re: how to put an special code in a string
Date
Msg-id 20030423135645.97679.qmail@web20808.mail.yahoo.com
Whole thread Raw
In response to Re: how to put an special code in a string  (Tomasz Myrta <jasiek@klaster.net>)
List pgsql-sql
--- 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



pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Oracle 9i under RedHat Linux 8.0 - Simple Installation: Getting started
Next
From:
Date:
Subject: Why is seq search preferred here by planner?