Cannot execute null query

Поиск
Список
Период
Сортировка
Искать

Cannot execute null query

От:
Fran Fabrizio <ffabrizio@mmrd.com>
Дата:

I got this error when trying to use a view, so I suspect that it was the 
view definition query that was throwing this.  I'd never seen this error 
before so I did a search of the list archives and the newsgroups and web 
in general and found nothing.  From the pattern of it happening, my best 
guess is that the underlying table had some data in it that was busting 
the view query, but having never seen this before I don't even know 
where to start looking.  I cannot reproduce it at all, and since the 
data in the underlying table is very fluid, I'll just have to hope to 
catch it in action today.  In the meantime, I thought I'd ask here to 
see if anyone recognizes this error?

Thanks,
Fran

Re: Cannot execute null query

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Fran Fabrizio  writes:
> I got this error when trying to use a view, so I suspect that it was the 
> view definition query that was throwing this.  I'd never seen this error 
> before so I did a search of the list archives and the newsgroups and web 
> in general and found nothing.  From the pattern of it happening, my best 
> guess is that the underlying table had some data in it that was busting 
> the view query, but having never seen this before I don't even know 
> where to start looking.

The only occurrences of that string that I can find in the source code
are in plpgsql: the various forms of EXECUTE throw that error if the
expression that's supposed to yield a query string yields NULL instead.
However, if that's what was happening then you should have seen some
indicator that the error was in a plpgsql function, not just the bare
error message.

			regards, tom lane
FAQ