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

Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Joerdens <frank(at)joerdens(dot)de>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs
Date: 2000-11-03 21:55:48
Message-ID: 8277.973288548@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Frank Joerdens <frank(at)joerdens(dot)de> writes:
> [ DBD::Pg fails against current sources with ]
> DBD::Pg::db table_info failed: ERROR:  Unable to identify an ordering
> operator '<' for type 'unknown'

Hmm.  It looks like this is caused by my reimplementation of UNION to
use CASE-style datatype resolution.  The DBD code is fetching table
data with a UNION that includes a couple of untyped literal constants.
Boiled down:

regression=# select 'foo' union select 'bar';
ERROR:  Unable to identify an ordering operator '<' for type 'unknown'
        Use an explicit ordering operator or modify the query

This is bad, since the same query used to work pre-7.1.

The reason it worked is that the old UNION code had an ugly hack to
force such constants to be treated as type text.  There is no such hack
in the datatype unification code right now.

Thomas, you've been muttering about altering the type resolution rules
so that "unknown" will be treated as "text" when all else fails.  Are
you planning to commit such a thing for 7.1?  If not, I'll probably have
to hack up parse_coerce.c's select_common_type(), along the lines of

  			}
  		}
  	}
+	/* if all inputs are UNKNOWN, treat as text */
+ 	if (ptype == UNKNOWNOID)
+		ptype = TEXTOID;
  	return ptype;
  }


This might be an appropriate change anyway.  Comments?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Vince VielhaberDate: 2000-11-03 21:57:35
Subject: Re: me too
Previous:From: lsearchwDate: 2000-11-03 21:47:35
Subject: Re: me too

pgsql-interfaces by date

Next:From: Thomas LockhartDate: 2000-11-04 07:43:19
Subject: Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs
Previous:From: Richard A. HollandDate: 2000-11-03 14:29:46
Subject: Access

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