Jon Wedell <wedell@bmrb.wisc.edu> writes:
> postgres=# create table test (inchi text);
> CREATE TABLE
> postgres=# insert into test values ('test+
> postgres'# ');
> INSERT 0 1
> postgres=# select * from test;
> inchi
> -------
> test++
>
> (1 row)
Well, that one is not a bug. The character value you inserted is
"t e s t + newline", and when psql renders a value including a
newline, by default it puts a plus at the end of the preceding line.
You can alter that behavior with psql's various \pset options, I believe.
> The second bug is that pyscopg2-binary is stripping a plus sign at the
> end of the value out.
I don't use pyscopg2, but I suspect that you're confusing
the decorative "+" shown by psql with actual data.
regards, tom lane