pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
DBD::Pg installation seems to fail with 7.1 libs
6+ messages / 4 participants
[nested] [flat]

* DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-03 13:34  Frank Joerdens <frank@joerdens.de>
  0 siblings, 1 reply; 6+ messages in thread

From: Frank Joerdens @ 2000-11-03 13:34 UTC (permalink / raw)
  To: pgsql-interfaces

Here´s the error:

------------------------- snip -------------------------
DBD::Pg::db table_info failed: ERROR:  Unable to identify an ordering
operator '<' for type 'unknown'
        Use an explicit ordering operator or modify the query
Can't call method "fetchrow_array" on an undefined value at test.pl line
103. 
------------------------- snap -------------------------

and this is the part of the test.pl script referred to by the error
message:


------------------------- snip -------------------------
 ######################### create table
     85
     86 $dbh->do("CREATE TABLE builtin (
     87   bool_      bool,
     88   char_      char,
     89   char12_    char(12),
     90   char16_    char(16),
     91   varchar12_ varchar(12),
     92   text_      text,
     93   date_      date,
     94   int4_      int4,
     95   int4a_     int4[],
     96   float8_    float8,
     97   point_     point,
     98   lseg_      lseg,
     99   box_       box
    100   )");
    101
    102 $sth = $dbh->table_info;
    103 my @infos = $sth->fetchrow_array; 
------------------------- snap -------------------------

Now, since it works with 6.4, and the developer of DBD::Pg says that
he´s tested this with 6.5, my hunch is that it has to do with some
change or other that was made in 7.1.

Has anyone tried to install or use DBI and DBD::Pg with the current
snapshot? The snapshot I used is from October 10.

I haven´t tested this with the current version, i.e. release 7, but will
probably do that if I get round to it.

Cheers Frank

-- 
frank joerdens               

joerdens new media
urbanstr. 116
10967 berlin
germany

e: frank@joerdens.de
t: +49 (0)30 69597650
f: +49 (0)30 7864046 
h: http://www.joerdens.de

pgp public key: http://www.joerdens.de/pgp/frank_joerdens.asc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-03 21:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Frank Joerdens <frank@joerdens.de>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2000-11-03 21:55 UTC (permalink / raw)
  To: Frank Joerdens <frank@joerdens.de>; +Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>; pgsql-hackers@postgreSQL.org; pgsql-interfaces

Frank Joerdens <frank@joerdens.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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [INTERFACES] DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-04 07:43  Thomas Lockhart <lockhart@alumni.caltech.edu>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Thomas Lockhart @ 2000-11-04 07:43 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Frank Joerdens <frank@joerdens.de>; pgsql-hackers@postgreSQL.org; pgsql-interfaces

> 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

I'm *finally* getting several patches together, to do the following
things:

o Fix the type resolution for unknown function arguments to fall back to
"text" or a string type, if available. Previously discussed.

o Implement an AT TIME ZONE clause, per SQL9x. Will handle an INTERVAL
argument, per standard, and also accept a string containing a time zone
spec, per existing PostgreSQL extension. Previously discussed.

o Fix timestamp/interval math across daylight savings time boundaries.
Previously discussed.

o Allow interpretation of "hh:mm:ss" as INTERVAL input. I can't remember
if I've mentioned this one before.

o Fix output of INTERVAL when sign of year/month is different than sign
of hour/min/sec. This is accompanied by changes in the "ISO" form of
output to more closely resemble a "hh:mm:ss" format. I just noticed the
problem today, so have not discussed it on list yet.

o Add some JOIN regression tests. More should be and will be done, but I
don't want to keep holding back patches on this. Per Tom Lane's request.


The only one with some potential for user trouble is the INTERVAL format
change. The old code was wrong, but the format itself has been changed
to be a little more concise.

                       - Thomas



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [HACKERS] Re: DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-13 11:27  Frank Jördens <frank@joerdens.de>
  parent: Thomas Lockhart <lockhart@alumni.caltech.edu>
  0 siblings, 2 replies; 6+ messages in thread

From: Frank Jördens @ 2000-11-13 11:27 UTC (permalink / raw)
  To: Thomas Lockhart <lockhart@alumni.caltech.edu>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-interfaces

Thomas Lockhart wrote:
> 
> > 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
> 
> I'm *finally* getting several patches together, to do the following
> things:
> 
> o Fix the type resolution for unknown function arguments to fall back to
> "text" or a string type, if available. Previously discussed.

Can this be expected to be found in the 7.1 snapshot release anytime
soon? Otherwise I would have to continue developing my app on 7.0.x,
which is not so good because eventually I will be requiring TOAST and
I'd like to run into 7.1 related trouble - should there be such a thing
;) - as early as possible.

Many Thanks, Frank



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [HACKERS] Re: DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-16 15:44  Frank Joerdens <frank@joerdens.de>
  parent: Frank Jördens <frank@joerdens.de>
  1 sibling, 0 replies; 6+ messages in thread

From: Frank Joerdens @ 2000-11-16 15:44 UTC (permalink / raw)
  To: pgsql-interfaces

Frank Jördens wrote:
> 
> Thomas Lockhart wrote:
> >
> > > 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
> >
> > I'm *finally* getting several patches together, to do the following
> > things:
> >
> > o Fix the type resolution for unknown function arguments to fall back to
> > "text" or a string type, if available. Previously discussed.
> 
> Can this be expected to be found in the 7.1 snapshot release anytime
> soon? Otherwise I would have to continue developing my app on 7.0.x,

works a treat with the changes committed last thursday :)

- Frank



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [HACKERS] Re: DBD::Pg installation seems to fail with 7.1 libs
@ 2000-11-16 17:06  Thomas Lockhart <lockhart@alumni.caltech.edu>
  parent: Frank Jördens <frank@joerdens.de>
  1 sibling, 0 replies; 6+ messages in thread

From: Thomas Lockhart @ 2000-11-16 17:06 UTC (permalink / raw)
  To: Frank Jördens <frank@joerdens.de>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-interfaces

> > o Fix the type resolution for unknown function arguments to fall back to
> > "text" or a string type, if available. Previously discussed.
> Can this be expected to be found in the 7.1 snapshot release anytime
> soon?

It is already there, and even has had a round of bug fixes already :)

I expect that it will work for you with no problems.

                  - Thomas



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2000-11-16 17:06 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-03 13:34 DBD::Pg installation seems to fail with 7.1 libs Frank Joerdens <frank@joerdens.de>
2000-11-03 21:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-11-04 07:43   ` Thomas Lockhart <lockhart@alumni.caltech.edu>
2000-11-13 11:27     ` Frank Jördens <frank@joerdens.de>
2000-11-16 15:44       ` Frank Joerdens <frank@joerdens.de>
2000-11-16 17:06       ` Thomas Lockhart <lockhart@alumni.caltech.edu>

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