Unix Technical Forum

BUG #4008: accepts invalid input with domaintypes and outer joins

This is a discussion on BUG #4008: accepts invalid input with domaintypes and outer joins within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 4008 Logged by: Robert Fritzsching Email address: robert.fritzsching@gmx.net PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:14 PM
Robert Fritzsching
 
Posts: n/a
Default BUG #4008: accepts invalid input with domaintypes and outer joins


The following bug has been logged online:

Bug reference: 4008
Logged by: Robert Fritzsching
Email address: robert.fritzsching@gmx.net
PostgreSQL version: 8.0.3, 8.3.0
Operating system: Windows XP, Linux Debian SID
Description: accepts invalid input with domaintypes and outer joins
Details:

Hi developer,

I found a bug:

If I insert data in a table with left outer join, I get no error even though
the domain type should trigger an error.

To reproduce the bug:
<!--
CREATE DOMAIN domname AS integer NOT NULL;

CREATE TABLE tblPrimary (colOtherColumn integer NOT NULL);
INSERT INTO tblPrimary (colOtherColumn) VALUES (10);
INSERT INTO tblPrimary (colOtherColumn) VALUES (20);
INSERT INTO tblPrimary (colOtherColumn) VALUES (30);
INSERT INTO tblPrimary (colOtherColumn) VALUES (40);

CREATE TABLE tblJoin (colWithDomname domname, colOtherColumn integer);
INSERT INTO tblJoin (colWithDomname, colOtherColumn) VALUES (1, 10);
INSERT INTO tblJoin (colWithDomname, colOtherColumn) VALUES (2, 20);
INSERT INTO tblJoin (colWithDomname, colOtherColumn) VALUES (3, 30);

CREATE TABLE tblResult (colWithDomname domname, colOtherColumn integer);
-->

finally this statement should failed:
<!--
INSERT INTO tblResult (SELECT tblJoin.colWithDomname,
tblPrimary.colOtherColumn FROM tblPrimary LEFT JOIN tblJoin
USING(colOtherColumn));
-->

The problem is the outer join - inner join or direct inserts produce an
error.

Thanks, Robert Fritzsching

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your Subscription:
http://mail.postgresql.org/mj/mj_www...tra=pgsql-bugs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:14 PM
Tom Lane
 
Posts: n/a
Default Re: BUG #4008: accepts invalid input with domaintypes and outer joins

"Robert Fritzsching" <robert.fritzsching@gmx.net> writes:
> If I insert data in a table with left outer join, I get no error even though
> the domain type should trigger an error.


This has been discussed before. Most of us think it's a bug in the SQL
spec that the issue even exists. What would you expect to happen with
an outer join that has a not-null-domain output column?

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your Subscription:
http://mail.postgresql.org/mj/mj_www...tra=pgsql-bugs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:00 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com