Re: new line in psotgres

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: new line in psotgres
Date: 2007-08-06 19:17:41
Message-ID: a47902760708061217n3db827afq75bada93e846ea1e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I tried '\r\n' in my plperl function to check for a newline character in the
table and its working fine.

Also, would E'\n' work ?
I really did not understand if word newline is a key word for a newline
character in postgres.

Thanks,
~Jas

On 8/6/07, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> On Mon, 2007-08-06 at 13:28 -0400, Jasbinder Singh Bali wrote:
> > Hi,
> > Can anyone please tell me what is the character for a new line in
> > postgres ?
> > I mean how does a new line get stored in postgres ?
> > Is it "\n" or "\\n" or something else ?
> >
>
> You can just put the newline directly in the SQL:
>
> INSERT INTO mytable(myattr) VALUES('first line
> second line
> third line');
>
> Regards,
> Jeff Davis
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-06 19:22:29 Re: 8.1.2 select for update issue
Previous Message Tom Lane 2007-08-06 19:11:06 Re: Template zero xid issue