sasha-alias / sqltabs

Rich SQL client for Postgresql, MySQL, MS SQL, Amazon Redshift, Google Firebase (Firestore)
https://www.sqltabs.com
GNU General Public License v3.0
803 stars 57 forks source link

Special characters in hstore values should not be dropped #82

Closed gjevardat closed 7 years ago

gjevardat commented 7 years ago

Hello

We store some special characters in our hstores used as delimiters (in the value part). The issue is that they are simply ignored, filtered, leading to hard to read results. In PgAdmin this character (Character delimiter = 27; in java) which I guess is an escape character is represented as a space. In psql it is represented as \x1B. The important thing is to print something just to be able to read the results.

Cheers

yazun commented 7 years ago

I think the last sentence should sound like "The important thing is to print something just to be able to read the results."

I echo that psql representation for non-printable characters would be the most convenient..

sasha-alias commented 7 years ago

Could you provide me an easy way to reproduce it? smth like:

create table test(h hstore);
insert into test values (???);
select * from test;
yazun commented 7 years ago

select format('a%sb',chr(27));

sasha-alias commented 7 years ago

thank you, I figured out how to fix that, but probably needs some generic approach for all non printable characters.. not sure yet which non printable characters should be replaced by their hex codes.

gjevardat commented 7 years ago

thanks, very efficient :)

sasha-alias commented 7 years ago

v0.15 released