| From: | Alban Hertroys <haramrae(at)gmail(dot)com> |
|---|---|
| To: | abdullatheef <latheefvkpadi(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: new line in psotgres |
| Date: | 2013-11-09 13:38:28 |
| Message-ID: | FD7D1B75-817F-49BB-A18F-CB69BF096B53@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Nov 9, 2013, at 12:08, abdullatheef <latheefvkpadi(at)gmail(dot)com> wrote:
> you can include newline in postgre using literal E
>
> create table table (text varchar(50));
> insert into Table (text) values (E'This is the first part \\n And this is
> the second');
Or like this:
development=> begin;
BEGIN
development=> create table t1 (text text);
CREATE TABLE
development=> insert into t1 values ('This is line 1.
development'> This is line 2.');
INSERT 0 1
development=> select * from t1;
text
-----------------
This is line 1.+
This is line 2.
(1 row)
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2013-11-09 16:48:37 | Re: Query runs forever after upgrading to 9.3 |
| Previous Message | abdullatheef | 2013-11-09 11:08:40 | Re: new line in psotgres |