String literals and escape characters in postgresql

后端 未结 5 548
灰色年华
灰色年华 2020-11-28 07:55

Attempting to insert an escape character into a table results in a warning.

For example:

create table EscapeTest (text varchar(50));

insert into Es         


        
5条回答
  •  渐次进展
    2020-11-28 08:32

    Really stupid question: Are you sure the string is being truncated, and not just broken at the linebreak you specify (and possibly not showing in your interface)? Ie, do you expect the field to show as

    This will be inserted \n This will not be

    or

    This will be inserted

    This will not be

    Also, what interface are you using? Is it possible that something along the way is eating your backslashes?

提交回复
热议问题