Re: BUG #15500: Cannot set NULL to a field with ENUM type - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #15500: Cannot set NULL to a field with ENUM type
Date
Msg-id 20181113145637.nyxrtmb5pwcct5pa@alvherre.pgsql
Whole thread Raw
In response to BUG #15500: Cannot set NULL to a field with ENUM type  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On 2018-Nov-13, PG Bug reporting form wrote:

> 3. Insert a new record:
> > INSERT INTO "public"."schedule" ("id", "week_day", "minute", "hour")
> VALUES (DEFAULT, 'NULL', DEFAULT, DEFAULT);

This is not a NULL value -- it's a string that says NULL.  Try with

INSERT INTO public.schedule (id, week_day, minute, hour)
 VALUES (DEFAULT, NULL, DEFAULT, DEFAULT);

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15500: Cannot set NULL to a field with ENUM type
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #15460: Error while creating index or constraint