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...!!




Tue, 17 Nov 1998 14:58:43 +0900
"=?euc-kr?B?vNux4r/4?=" <schiva@m2000.co.kr>
How to use text type field....
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



Tue, 17 Nov 1998 12:12:43 +0200
Herouth Maoz <herouth@oumail.openu.ac.il>
Re: [SQL] How to use text type field....