Toast,bytea, Text -blob all confusing - Mailing list pgsql-hackers

From jason.ory@ndchealth.com
Subject Toast,bytea, Text -blob all confusing
Date
Msg-id 758E226E2CFDD211961C0060080752308C154D@exchanger.ndcorp.com
Whole thread Raw
Responses Re: Toast,bytea, Text -blob all confusing
Re: Toast,bytea, Text -blob all confusing
List pgsql-hackers
I'm trying my best to convert from MySQL to PgSQL but I cant get a good
answer about 
certian questions. It was an easy task in mysql but all this talk about
, text , toast and bytea is just confusing me.
I cant get a clear picture of any of this,from the book from Bruce, the
e-mail archives. Ive looked all i can,
with every keyword i can think of from years past. Here is my situation.


WHAT I WAS DOING IN MYSQL
Via the web my clients are uploading basic  text/data files, sometimes >
than 30MB. In the past ,via CGI I have been parsing the file
into one STL string, using mysql_escape_string to escape it and then using
an INSERT  to place the   ,\'+"stlstring+"\' ,    into a BLOB column. 
I dont want to use a temp. file anywhere. The data will always be passed via
the database and buffers for certian reasons.


THIS IS WHAT I CANT SEEM TO FIGURE OUT IN POSTGRESQL
1. I cant get a clear answer on what kind of data type to use for my large
text string?  TEXT, ???, ??? or something about TOAST
I have seen in the e-mail archive but cant find any documentaion?

2. I've written my own escape method ,("cant find one for Pgsql") , BUT i
don't know what 
to escape and not to escape. So it keeps failing. I cand find any docs. on
what to escape either?


SUMMARY
What datatype do I use? How Im a supposed to escape it and get it though the
parser correctly so i can
retrieve it correctly?


Thnks for your time.

PS: Using RedHat.



Jason H. Ory
Medprint+
Software Developer
(205) 989-4617
jason.ory@ndchealth.com



pgsql-hackers by date:

Previous
From: "Colin 't Hart"
Date:
Subject: Re: List response time...
Next
From: Tom Lane
Date:
Subject: Re: /include/config.h