Re: Stored Procedure warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stored Procedure warnings
Дата
Msg-id 12020.963367285@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stored Procedure warnings  (ryan <ryan@bel.bc.ca>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Cesar A. K. Grossmann"
Дата:
Сообщение: Complex checking with SQL
Следующее
От: Chris Bitmead
Дата:
Сообщение: Re: psql and Gnu readline