Re: Segmentation fault while COPY in 7.3 - Mailing list pgsql-general

From Joe Conway
Subject Re: Segmentation fault while COPY in 7.3
Date
Msg-id 3DE99EE6.3000102@joeconway.com
Whole thread Raw
In response to Re: Segmentation fault while COPY in 7.3  ("Nicolai Tufar" <ntufar@apb.com.tr>)
Responses Re: Segmentation fault while COPY in 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Nicolai Tufar wrote:
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
>>Hm.  Offhand it would seem that somebody's output function is returning
>>a non-palloc'd string.  What are the datatypes in that table, exactly?
>
> apb=> \d maras2.mrk_yyn
>            Table "maras2.mrk_yyn"
>  Column  |         Type          | Modifiers
> ---------+-----------------------+-----------
>  bsvr_no | character varying(10) |
>  yyn_tur | character varying(1)  |
>  yyn_no  | numeric               |
>  yyn_syf | numeric               |
>  yyn_trh | date                  |

FWIW, I just tried to repeat this on cvs tip and could not. Seems to work just
fine:

regression=# create table foo(bsvr_no character varying(10),yyn_tur character
varying(1),yyn_no numeric,yyn_syf numeric,yyn_trh date);
CREATE TABLE
regression=# insert into foo values('a','a','1.0','1.0',now()::date);
INSERT 556825 1
regression=# copy foo to stdout;
a       a       1.0     1.0     2002-11-30
regression=# copy foo(bsvr_no) to stdout;
a
regression=# copy foo(bsvr_no,yyn_tur,yyn_no,yyn_syf,yyn_trh) to stdout;
a       a       1.0     1.0     2002-11-30
regression=# insert into foo values('a','a','1.0','1.0',null);
INSERT 556826 1
regression=# copy foo(bsvr_no,yyn_tur,yyn_no,yyn_syf,yyn_trh) to stdout;
a       a       1.0     1.0     2002-11-30
a       a       1.0     1.0     \N


Joe



pgsql-general by date:

Previous
From: "Nicolai Tufar"
Date:
Subject: Re: Segmentation fault while COPY in 7.3
Next
From: Tom Lane
Date:
Subject: Re: Segmentation fault while COPY in 7.3