Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread James B. Byrne
On Tue, March 8, 2011 10:09, Scott Ribe wrote: > On Mar 8, 2011, at 7:54 AM, James B. Byrne wrote: > >> My question is: Why am I getting a NULL exception? > > Because you're trying to insert NULL explicitly? Yes, that is the problem. Evidently RoR's ActiveRecord helpfully converts a string cont

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread David Johnston
again for that a zero weight is impossible so the above would only apply to the net-weight. Just some thoughts. David J. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of James B. Byrne Sent: Tuesday, March 08, 2011 9:55 A

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread Raymond O'Donnell
On 08/03/2011 14:54, James B. Byrne wrote: My question is: Why am I getting a NULL exception? Should I only specify DEFAULT and drop the NOT NULL constraint? Good question. Are you trying to insert an explicit NULL? Can you show us your INSERT statement? Ray. -- Raymond O'Donnell :: Galway

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread Thom Brown
On 8 March 2011 20:24, James B. Byrne wrote: > version = postgresql-8.4.4-2PGDG.el5.src.rpm > > I am seeing this problem and I cannot explain why it is happening. > Evidently I misapprehend something about the interaction of NOT NULL > and DEFAULT.  If someone could tell me what the actual case is

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread Scott Ribe
On Mar 8, 2011, at 7:54 AM, James B. Byrne wrote: > My question is: Why am I getting a NULL exception? Because you're trying to insert NULL explicitly? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsq

[GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread James B. Byrne
version = postgresql-8.4.4-2PGDG.el5.src.rpm I am seeing this problem and I cannot explain why it is happening. Evidently I misapprehend something about the interaction of NOT NULL and DEFAULT. If someone could tell me what the actual case is I would appreciate it very much. The table definitio