Re: [QUESTIONS] impossible insert data into VARCHAR - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [QUESTIONS] impossible insert data into VARCHAR
Date
Msg-id 34D9D842.98A82F17@alumni.caltech.edu
Whole thread Raw
Responses Re: [HACKERS] Re: [QUESTIONS] impossible insert data into VARCHAR  (jwieck@debis.com (Jan Wieck))
Re: [HACKERS] Re: [QUESTIONS] impossible insert data into VARCHAR  (Bruce Momjian <maillist@candle.pha.pa.us>)
connection error  (sferac@bo.nettuno.it)
List pgsql-hackers
> There's an error while inserting data into a column defined as VARCHAR without
> length in PostgreSQL 6.3.
> Take a look:
>
> postgres=>  CREATE TABLE prova ( uno VARCHAR(10) );
> CREATE
> postgres=> INSERT INTO prova VALUES ( 'OK' );
> INSERT 153042 1
>
> postgres=>  CREATE TABLE prova2 ( uno VARCHAR );
> CREATE
> postgres=> INSERT INTO prova2 VALUES ( 'NOT OK' );
> PQexec() -- Request was sent to backend, but backend closed the channel before responding.
>         This probably means the backend terminated abnormally before or while processing the request.

Jose, please post problem reports to hackers, not to questions, on not-yet-released versions. I've moved
this to hackers.

btw, I saw this too but in a different context and wasn't certain if it was a new problem:

postgres=> select char_length('hi'::text);
length
------
     2
(1 row)

postgres=> select character_length('hi'::varchar);
PQexec() -- Request was sent to backend, but backend closed the channel before responding.
        This probably means the backend terminated abnormally before or while processing the request.

                                                              - Tom


pgsql-hackers by date:

Previous
From: Mattias Kregert
Date:
Subject: Re: [HACKERS] Hi
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Linux: linux.s / tas.s not found...