Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Craig Ringer
Bryce Nesbitt wrote: > Craig Ringer wrote: >> Yes - but you are *not* presenting a Latin-1 character. You're >> presenting four Latin-1 characters: >> >> '\', '3', '7', '5' > Well, then I have a different question. If I can view a bytea column as > so: > >> select object from context_objects wh

[SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Bryce Nesbitt
I'm tracking another bug, but wanted to verify stuff on the command line.  I can't figure out why this did not work: # psql dblack3-deleteme Welcome to psql 8.3.8 (server 8.3.4), the PostgreSQL interactive terminal. dblack3-deleteme=> create table bryce1 (key int,val1 text,val2 bytea); dblack3

Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Craig Ringer
Bryce Nesbitt wrote: > Craig Ringer wrote: >> Yes - but you are *not* presenting a Latin-1 character. You're >> presenting four Latin-1 characters: >> >> '\', '3', '7', '5' > Well, then I have a different question. If I can view a bytea column as > so: > >> select object from context_objects wh

Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Bryce Nesbitt
Craig Ringer wrote: Yes - but you are *not* presenting a Latin-1 character. You're presenting four Latin-1 characters: '\', '3', '7', '5' Well, then I have a different question. If I can view a bytea column as so: > select object from context_objects where context_key=100041; obje

Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Craig Ringer
Bryce Nesbitt wrote: > > > Craig Ringer wrote: >> In truth, that's how I'd expect it to happen. If I ask for the byte 0xfd >> in a string, I don't want the server to decide that I must've meant >> something else because I have a different client encoding. If I wanted >> encoding conversion, I wou

Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Bryce Nesbitt
Craig Ringer wrote: In truth, that's how I'd expect it to happen. If I ask for the byte 0xfd in a string, I don't want the server to decide that I must've meant something else because I have a different client encoding. If I wanted encoding conversion, I wouldn't have written it in an escape fo

Re: [SQL] Why don't I get a LATIN1 encoding here with SET ENCODING?

2009-11-03 Thread Craig Ringer
Bryce Nesbitt wrote: > I'm tracking another bug, but wanted to verify stuff on the command line. I > can't figure out why this did not work: > dblack3-deleteme=> insert into bryce1 values(1,2,'test\375'); > ERROR: invalid byte sequence for encoding "UTF8": 0xfd I'd say the server is interpreti