Paul on Wed, 17 Jul 2002 22:00:11 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] PostgreSQL question


It does work. Here's my test:

CREATE TABLE "datetest" (
  "serial" int4 DEFAULT nextval('"datetest_serial_seq"'::text) NOT NULL,
  "nulldate" date
);
CREATE  UNIQUE INDEX "datetest_serial_key" ON "datetest" ("serial");


INSERT INTO "datetest" ("serial", "nulldate") VALUES (NEXTVAL('"datetest_serial_seq"'::text), NULL)


SELECT * FROM datetest;
serial | nulldate
--------+----------
     1 |
     2 |
(2 rows)

Does anybody know why I can't seem to have a nullable date field in my PG
database?  The field is to hold the date of an event, if the event
occurred, and nothing if the event didn't occur.




______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug