Re: [SQL] How to use text type field....

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: <schiva(at)m2000(dot)co(dot)kr>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] How to use text type field....
Date: 1998-11-17 10:12:43
Message-ID: l03110702b276fba6d30b@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-hackers pgsql-interfaces pgsql-sql

At 7:58 +0200 on 17/11/98, =?euc-kr?B?vNux4r/4?= wrote:

>
> Hi~ Everyone...
>
> I have some problem... with PostgreSql Version 6.4
>
> I don't know how to use text type data filed...
>
> Hm...
> ---------------------------------------------------------------
> create table test(
> id int primary key,
> data1 text)
>
> How to use "insert into test........" ??
> How to use "update test ....." ???
>
> data1 size is so!!! Big....~~~ Can't execute query...in C Language....
>
> Do you have some sample code with C Language...???
>
> Anybody.... Please.. Help me...!!

Text type is nothing special. You just use

INSERT INTO TEST (id, data1)
VALUES ( 12345, 'This is the text I wanted to Enter' );

and

UPDATE TEST
SET data1 = 'This is the new text I wanted to Enter';

That's all there is to it. Put the text within single quoute. Escape single
quotes within the text by doubling them ('' instead of '). The text may
include newlines and everything:

INSERT INTO TESTE (id, data1)
VALUES (
123456,
'This is a three-line
text field
within the table' );

Just remember not to pass the maximum row size, which I believe is still 8k
for all the fields together.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Milinkovic Vlastimir 1998-11-17 11:01:06 regards
Previous Message 송기원 1998-11-17 05:58:43 How to use text type field....

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Hoffmann 1998-11-17 14:37:34 where to find dbf2pg-3.0?
Previous Message Guy Durrieu 1998-11-17 07:49:43 pg_dump

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 1998-11-17 11:17:04 Re: [HACKERS] New to PostgreSQL, is this a DoS?
Previous Message Michael Meskes 1998-11-17 09:18:24 Re: [HACKERS] PREPARE

Browse pgsql-interfaces by date

  From Date Subject
Next Message Nicoleta TATARU 1998-11-17 10:30:17 unsubscribe
Previous Message Michael Meskes 1998-11-17 09:18:24 Re: [HACKERS] PREPARE

Browse pgsql-sql by date

  From Date Subject
Next Message Nicoleta TATARU 1998-11-17 10:29:35 unsubscribe
Previous Message 송기원 1998-11-17 05:58:43 How to use text type field....