Bug 3015 - SQL-92 defines BIT and BIT VARYING
Summary: SQL-92 defines BIT and BIT VARYING
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: Other Linux
: Normal enhancement
Assignee: SQL devs
URL: http://www.contrib.andrew.cmu.edu/~sh...
Keywords: NONEEDTOTEST
Depends on:
Blocks:
 
Reported: 2012-02-15 22:43 CET by Stefan de Konink
Modified: 2017-07-27 13:30 CEST (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2012-02-15 22:43:07 CET
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier: 

Would it be viable to implement BIT (as bit) and BIT VARYING (maybe as smallest possible fixed datatype given the precision)?

I'm currently using the very easy workaround using the example below, but I guess using the datatypes and operators (4.3.2) designed for this might be a better idea.

cast(power(2, dayofweek(cast('2012-02-15' as date))) as smallint))

Reproducible: Always
Comment 1 Martin Kersten cwiconfidential 2012-02-15 23:34:43 CET
Bit and bitvarying datatypes are also common in astronomy.
Comment 2 Ying Zhang cwiconfidential 2012-11-27 15:48:34 CET
No test needed for feature request
Comment 3 Martin van Dinther cwiconfidential 2017-07-27 12:57:49 CEST
According to https://en.wikipedia.org/wiki/SQL:2003
the data types "BIT" and "BIT VARYING" have been removed from SQL:2003 standard.
See line: "removal of the poorly implemented "BIT" and "BIT VARYING" data types".
Comment 4 Stefan de Konink 2017-07-27 13:30:48 CEST
(In reply to Martin van Dinther from comment #3)
> According to https://en.wikipedia.org/wiki/SQL:2003
> the data types "BIT" and "BIT VARYING" have been removed from SQL:2003
> standard.
> See line: "removal of the poorly implemented "BIT" and "BIT VARYING" data
> types".

Again a reason why it should have been implemented before ;) But since it is in PostgreSQL I find it a good reason to be feature matching.