I don't think you see what I mean :)

I want to display the data on a webpage to the user.  This means that a
varchar containing the string "I don't want it", should not appear as "I
don''t want it".  So pg_escape_string isn't used there.  bytea is different
tho because the default display isn't terribly useful...

Chris

----- Original Message ----- 
From: "Rod Taylor" <[EMAIL PROTECTED]>
To: "Christopher Kings-Lynne" <[EMAIL PROTECTED]>
Cc: "Hackers" <[EMAIL PROTECTED]>
Sent: Thursday, August 07, 2003 9:46 AM
Subject: Re: [HACKERS] encoding question

> My other question is we play around with bytea fields to escape nulls and
> chars < 32 and stuff so that when someone browses the table, they get
> '\000<unknown>\000...', etc.  However, are the other field types for which
> we have to do this?  Can you put nulls and stuff in text/varchar/char
> fields?  What about other fields?

pg_escape_string
pg_escape_bytea

Escape everything :)


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to