Re: raise is not working

From: "CHRIS HOOVER" <CHRIS(dot)HOOVER(at)companiongroup(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: raise is not working
Date: 2004-09-23 17:04:00
Message-ID: NY86502f-00f427a0@companiongroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

tom,

They were a double quote. I switched all of the double quotes out for single
quotes but still not go. The function appears to run and return no results
but, I don't get any raises. I have even tried moving the raises to be fire
first lines in the function, but to no avail.

That first assignment was ment to set SQL_Str to hold the value: select * from
clmhdr. I don't think I need to single quotes. That would set it to 'select
* from clmhdr', right???

I'm very confused as to why I'm not seeing anything here.

I looked at my settings, and client_min_messages, and server_min_messages are
both set to the default of notice.

Thanks for any help,

Chris
------------------( Forwarded letter 1 follows )---------------------
Date: Thu, 23 Sep 2004 12:52:07 -0400
To: chris.hoover
Cc: Josh(dot)Berkus[josh](at)agliodbs(dot)com(dot)comp, pgsql-sql(at)postgresql(dot)org(dot)comp
From: Tom(dot)Lane[tgl](at)sss(dot)pgh(dot)pa(dot)us(dot)comp
Sender: pgsql-sql-owner+m19055(at)postgresql(dot)org(dot)comp
Subject: Re: [SQL] raise is not working

"CHRIS HOOVER" <CHRIS(dot)HOOVER(at)companiongroup(dot)com> writes:
> Sorry for the delay, here is the function.

> CREATE OR REPLACE FUNCTION "public"."clmhdr_grid_query" (varchar, varchar,
> varchar, varchar, varchar, varchar) RETURNS SETOF "public"."clmhdr" AS'
> ...
> SQL_Str := "select * from clmhdr";

If those are really double quotes then I'd expect you to be getting
errors along the lines of

ERROR: column "select * from clmhdr" does not exist

long before you get to the RAISEs. You need doubled single quotes, eg
SQL_Str := ''select * from clmhdr'';
See the docs.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-09-23 17:11:46 Re: raise is not working
Previous Message Tom Lane 2004-09-23 16:52:07 Re: raise is not working