Thread
-
Boolean and Bit
Keith Gray <keith@heart.com.au> — 2001-01-17T02:01:14Z
Hello All, This is my first post (so be gentle with me)... Is there a searchable archive? I would like suggestions and examples of adding SQL-92 data type BIT compatibility to a PostgreSQL schema. >From the doc's I gather you can "CREATE TYPE bit" with storage int or int4... but I don't know about the input/output for zero and one. Should SQL (ODBC) be able to ask "WHERE bitfield;" or should it ask "WHERE bitfield = 1;" ? Any response gratefully recognized... Keith
-
Re: Boolean and Bit
Josh Berkus <josh@agliodbs.com> — 2001-01-17T04:35:01Z
Keith, > This is my first post (so be gentle with me)... Well, yea-hah! Fresh meat, boys! Bring out the branding iron and the Wayne Newton B-sides! > I would like suggestions and examples of adding SQL-92 > data type BIT compatibility to a PostgreSQL schema. First let me ask you: Why do you want a Bit type? What purpose does it serve that INT2 and BOOLEAN do not? I'm not being sarcastic -- this is an important question to ask before creating *any* custom type on any RDBMS. -Josh Berkus