Skip site navigation (1) Skip section navigation (2)

Bug #604: string join problem

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #604: string join problem
Date: 2002-02-26 13:50:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Erol Ozcan (erol(at)infotron(dot)com(dot)tr) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
string join problem

Long Description
I have a major problem with string joining in sql query in Postgresql 7.1.3. It is always return null string if any of column has null value.
I attached some example code sources to explain the problem.

Sample Code
  phn_id                 INT                NOT NULL PRIMARY KEY,
  phn_country            INT                NULL,
  phn_area               INT                NULL,
  phn_number             INT                NULL,
  phn_ext                INT                NULL
INSERT INTO phone VALUES( 30, 90, 216, 4921002, NULL );
SELECT '+'|| phn_country||'-'||phn_area||'-'||phn_number FROM phone WHERE phn_id=30;
(1 row)

SELECT '+'||phn_country||'-'||phn_area||'-'||phn_number||' ext:'||phn_ext FROM phone WHERE phn_id=30;
(1 row)

No file was uploaded with this report


pgsql-bugs by date

Next:From: Tom LaneDate: 2002-02-26 15:28:47
Subject: Re: Bug #603: time() problems with PostgreSQL 7.2
Previous:From: pgsql-bugsDate: 2002-02-26 13:43:38
Subject: Bug #603: time() problems with PostgreSQL 7.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group