From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | novnov <novnovice(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Simple stored procedure examples? |
Date: | 2006-11-05 10:12:36 |
Message-ID: | 20061105101236.GC3979@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Nov 04, 2006 at 08:35:28AM -0800, novnov wrote:
> So pgSQL is case sensitive and that include keywords like UPDATE and SET.
No it's not. Only identifiers in double quotes (") are case-sensetive.
So, in your example below, because the function was created with double
quotes, you now have to use double quotes and the same case every time
you want to use it. If you create a function/table/column without
double quotes, you never need quotes and it is case-insensetive.
In your case it's possible that pgAdmin is adding the quotes for you,
maybe?
> There what worked, for the record:
>
> -- Function: "proc_UpdateItemName"()
>
> -- DROP FUNCTION "proc_UpdateItemName"();
>
> CREATE OR REPLACE FUNCTION "proc_UpdateItemName"()
> RETURNS void AS
> $BODY$UPDATE "Item" SET "ItemName" = 'fox';$BODY$
> LANGUAGE 'sql' VOLATILE;
> ALTER FUNCTION "proc_UpdateItemName"() OWNER TO postgres;
>
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2006-11-05 10:17:24 | Re: Converting a timestamp to a time |
Previous Message | Martijn van Oosterhout | 2006-11-05 10:07:31 | Re: dividing integers not producing decimal fractions |