pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dsl0530@hotmail.com
Subject: BUG #15730: Using filter function to interpolate data, the length limit of table field is invalid
Date: Wed, 03 Apr 2019 03:58:15 +0000
Message-ID: <15730-89c190533b542f2e@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15730
Logged by:          ShuLin Du
Email address:      dsl0530@hotmail.com
PostgreSQL version: 9.6.6
Operating system:   RedHat Enterprise linux 7.3
Description:        

I use the pg_bulkload(3.1.14) to load the file data into table .  
The input data(file data) needs to be processed by filtering function(Define
filter function in CTL file) before insert into table.
But I found that if I used a filter function to process input data,then
output to db table,the maximum length limit for table fields is invalid. 

filter function as below (input data :2 items, output data: 3 items): 
create function FVUA001(varchar,varchar) returns record as $BODY$ 
  select row($1,$2,null) $BODY$ 
 language sql volatile
cost 100;

But, Even if the length of a field in the input data is longer than the
length of the table definition,data will also be successfully inserted into
tables. So I wonder if this would be a postgreSQL bug.  
Please help me solve this problem. Thanks a lot.



Message-ID: <15730-89c190533b542f2e@postgresql.org>
Permalink:  ../15730-89c190533b542f2e@postgresql.org/
Also on:    postgresql.org/message-id/15730-89c190533b542f2e@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, dsl0530@hotmail.com
  Subject: Re: BUG #15730: Using filter function to interpolate data, the length limit of table field is invalid
  In-Reply-To: <15730-89c190533b542f2e@postgresql.org>
  References: <15730-89c190533b542f2e@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox