Thread: Stored Procedure warnings

Stored Procedure warnings

From
ryan
Date:
Hi,

I tried to create a stored procedure:

be=# CREATE FUNCTION freeip ( int4 ) RETURNS inet AS '
be'# (SELECT ip FROM allips WHERE net = $1)
be'#   EXCEPT
be'#  (SELECT ipaddr FROM ips WHERE ipaddr <<
be'#    (SELECT net FROM nets WHERE netid = $1))
be'# order by ip'
be-# LANGUAGE 'sql';
NOTICE:  _outNode: don't know how to print type 703
NOTICE:  _outNode: don't know how to print type 703
NOTICE:  _outNode: don't know how to print type 703
NOTICE:  _outNode: don't know how to print type 703
CREATE

Then every call to freeip() generates those _outNode warning
messages...

Now, this is with postgresql 7.0.2... I have another box with
postgresql, but it is the debian package of such, and this works
perfectly on it.. I have another machine running stampede (ick) and I
compiled postgresql and now it gives me this warning...

Is there something im missing here?

Thanks,
-ryan


--
Ryan Rawson
System Administrator
Binary Environments Ltd.
ryan@bel.bc.ca

REMOVE from Mailist

From
"Sieu Ngo"
Date:
----- Original Message -----


Re: Stored Procedure warnings

From
Tom Lane
Date:
ryan <ryan@bel.bc.ca> writes:
> be=# CREATE FUNCTION freeip ( int4 ) RETURNS inet AS '
> be'# (SELECT ip FROM allips WHERE net = $1)
> be'#   EXCEPT
> be'#  (SELECT ipaddr FROM ips WHERE ipaddr <<
> be'#    (SELECT net FROM nets WHERE netid = $1))
> be'# order by ip'
> be-# LANGUAGE 'sql';
> NOTICE:  _outNode: don't know how to print type 703
> NOTICE:  _outNode: don't know how to print type 703
> NOTICE:  _outNode: don't know how to print type 703
> NOTICE:  _outNode: don't know how to print type 703
> CREATE

It's fairly harmless ... I deduce that you are running the postmaster
with some fairly high -d setting, or you wouldn't see it at all.

The underlying problem here is that EXCEPT is implemented in a
bizarre way in which the second SELECT isn't run through the
parse analysis phase right away.  If you have parsetree dumping
turned on then the dumper encounters "raw" unanalyzed node types
that it doesn't know how to print.  No big deal, really.

We could extend the dumping code to know about more of the raw node
types, but IMHO the real problem is that EXCEPT is done the way it is.
It's on my hit list for 7.2...

            regards, tom lane