Bartm85
2006-Oct-30 11:27 UTC
pg_escape_bytea / pg_unescape_bytea (php) alternative in Rails?
Is there a built-in function that handles the problem of bitstreams in postgresql? The problem occurs when the stream contains for example the " character. Postgres will think that the string has ended with that character. Is there a function that changes all such characters into "\[ASCII-number]"? And the other way around when getting the stream back from the database? References: http://be.php.net/manual/nl/function.pg-escape-bytea.php http://be.php.net/manual/nl/function.pg-unescape-bytea.php --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Bartm85
2006-Oct-30 11:32 UTC
pg_escape_bytea / pg_unescape_bytea (php) alternative in Rails?
Is there a built-in function that handles the problem of bitstreams in postgresql? The problem occurs when the stream contains for example the " character. Postgres will think that the string has ended with that character. Is there a function that changes all such characters into "\[ASCII-number]"? And the other way around when getting the stream back from the database? References: http://be.php.net/manual/nl/function.pg-escape-bytea.php http://be.php.net/manual/nl/function.pg-unescape-bytea.php --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jeremy Kemper
2006-Oct-30 20:32 UTC
Re: pg_escape_bytea / pg_unescape_bytea (php) alternative in Rails?
On 10/30/06, Bartm85 <bartm85-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > Is there a built-in function that handles the problem of bitstreams in > postgresql? The problem occurs when the stream contains for example the > " character. Postgres will think that the string has ended with that > character. Is there a function that changes all such characters into > "\[ASCII-number]"? And the other way around when getting the stream > back from the database? > References: > http://be.php.net/manual/nl/function.pg-escape-bytea.php > http://be.php.net/manual/nl/function.pg-unescape-bytea.phpbytea column values are automatically escaped and unescaped. jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---