Forum OpenACS Q&A: Response to Bug in bboard_q_and_a_categories

Collapse
Posted by Roberto Mello on
Oh, you mean PostgreSQL should have caught it while loading the data model ? If that's what you have in mind, then it didn't catch it.

For testing, I created a db called foo and loaded a subset of bboard_topics and bboard_q_and_a_categories (with the varchar) and it loaded fine. I am running PostgreSQL beta 2 though, which is kind of old, so this may have been fixed, but it'd be worth to check for this in a newer release of PG.

[nsadmin@fslc sql]$ psql -f foobar.sql foo
psql:foobar.sql:9: NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'bboard_topics_pkey' for table 'bboard_topics'
psql:foobar.sql:9: NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'bboard_topics_topic_key' for table 'bboard_topics'
CREATE
psql:foobar.sql:17: NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
CREATE

foo=# d bboard_topics
           Table "bboard_topics"
  Attribute  |     Type     |   Modifier
-------------+--------------+---------------
 topic_id    | integer      | not null
 topic       | varchar(200) | not null
 read_access | varchar(16)  | default 'any'
Indices: bboard_topics_pkey,
         bboard_topics_topic_key
Constraint: (((read_access = 'any'::"varchar") OR (read_access = 'public'::"varchar")) OR (read_access = 'group'::"varchar"))
foo=# d bboard_q_and_a_categories
  Table "bboard_q_and_a_categories"
 Attribute |     Type     | Modifier
-----------+--------------+----------
 topic_id  | varchar(100) | not null
 category  | varchar(200) | not null