Re: what exactly is a query structure? - Mailing list pgsql-sql

From Tom Lane
Subject Re: what exactly is a query structure?
Date
Msg-id 27166.1267197116@sss.pgh.pa.us
Whole thread Raw
In response to Re: what exactly is a query structure?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
"A. Kretschmer" <andreas.kretschmer@schollglas.com> writes:
> In response to silly sad :
>> my own wild guess:
>> string constant '*' is of type "unknown"

> Maybe. Add a explicit cast, for instance '*'::text

Definitely.  More recent versions of PG provide a more explicit error
message:

regression=# SELECT * from get_noobs();
ERROR:  structure of query does not match function result type
DETAIL:  Returned type unknown does not match expected type text in column "pass".
CONTEXT:  PL/pgSQL function "get_noobs" line 2 at RETURN QUERY
        regards, tom lane


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: what exactly is a query structure?
Next
From: Petru Ghita
Date:
Subject: Date comparison, user defined operators and magic