Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: what exactly is a query structure?


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: "A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
  • Cc: pgsql-sql(at)postgresql(dot)org
  • Subject: Re: what exactly is a query structure?
  • Date: Fri, 26 Feb 2010 10:11:56 -0500
  • Message-id: <27166.1267197116@sss.pgh.pa.us> <text/plain>

"A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group