On 12/02/2016 04:23 AM, Alexander Farber wrote:
Thank you, Rob -
On Fri, Dec 2, 2016 at 11:12 AM, Rob Sargent mailto:robjsarg...@gmail.com>> wrote:
> On Dec 2, 2016, at 2:52 AM, Alexander Farber
mailto:alexander.far...@gmail.com>> wrote:
>
> CREATE OR REPLACE FUNCTION words_unb
Thank you, Rob -
On Fri, Dec 2, 2016 at 11:12 AM, Rob Sargent wrote:
>
> > On Dec 2, 2016, at 2:52 AM, Alexander Farber
> wrote:
> >
> > CREATE OR REPLACE FUNCTION words_unban_user(
> > in_uid integer)
> > RETURNS integer AS
> > $func$
> > UPDATE words_users SET
> >
> And finally here is the failing usage of the function :
>
> words=> SELECT uid FROM words_unban_user(1);
> ERROR: column "uid" does not exist
> LINE 1: SELECT uid FROM words_unban_user(1);
> ^
>
>
Shouldn't you be doing:-
SELECT words_unban_user(1);
--
Sent via pgsql-ge
Hello,
why does this fail in PostgreSQL 9.5 please?
Here is my custom SQL function :
CREATE OR REPLACE FUNCTION words_unban_user(
in_uid integer)
RETURNS integer AS
$func$
UPDATE words_users SET
banned_until = null,
banned_reason = null
WHERE uid =