dbTalk Databases Forums  

One-byte integral type?

comp.databases.postgresql comp.databases.postgresql


Discuss One-byte integral type? in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Karsten Wutzke
 
Posts: n/a

Default Re: One-byte integral type? - 09-08-2009 , 04:47 AM






On 8 Sep., 11:04, "Laurenz Albe" <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
Karsten Wutzke wrote:
Is it because of the SQL standard, that PostgreSQL doesn't have a one-
byte type, too?

I didn't check, but I don't think so. That would be surprising.

It really doesn't contain one...

Oh, what I meant is that I don't think that the SQL Standard
*forbids* it.

Hmmm I don't really understand this sentence. What do you mean by it?
Because the SQL standard doesn't include a one-byte, it doesn't forbid
it? :-S

Karsten

Reply With Quote
  #12  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: One-byte integral type? - 09-08-2009 , 05:05 AM






Karsten Wutzke, 08.09.2009 11:45:
Quote:
Yes, I just meant internally. Since I don't have a PostgreSQL running
anywhere, could you find out for me how many bytes are occupied by a
BOOLEAN, please?
There is a pretty cool new feature that makes it into a lot of products nowadays.
It's called "The Manual" and most of the time it explains how a piece of software works.

But - what's even better - most of the times this "manual" thing is available online, so one doesn't need to install the corresponding product. Pretty nifty if you ask me.

Postgres follows this trend and suprsingly enough your question is answered directly in the documentation of the boolean datatype:

http://www.postgresql.org/docs/curre...e-boolean.html


Regards
Thomas

Reply With Quote
  #13  
Old   
Karsten Wutzke
 
Posts: n/a

Default Re: One-byte integral type? - 09-08-2009 , 05:46 AM



On 8 Sep., 12:05, Thomas Kellerer <OTPXDAJCS... (AT) spammotel (DOT) com> wrote:
Quote:
Karsten Wutzke, 08.09.2009 11:45:

Yes, I just meant internally. Since I don't have a PostgreSQL running
anywhere, could you find out for me how many bytes are occupied by a
BOOLEAN, please?

There is a pretty cool new feature that makes it into a lot of products nowadays.
It's called "The Manual" and most of the time it explains how a piece of software works.

But - what's even better - most of the times this "manual" thing is available online, so one doesn't need to install the corresponding product. Pretty nifty if you ask me.

Postgres follows this trend and suprsingly enough your question is answered directly in the documentation of the boolean datatype:

http://www.postgresql.org/docs/curre...e-boolean.html

Regards
Thomas
You're right. I'm a little tired of reading documentation. :-
( Everything answered. Though the facts are a little strange. No one-
byte integral type, but booleans as one-byte in storage...

Thanks
Karsten

Reply With Quote
  #14  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: One-byte integral type? - 09-08-2009 , 09:11 AM



Karsten Wutzke wrote:
Quote:
Is it because of the SQL standard, that PostgreSQL doesn't have a one-
byte type, too?

I didn't check, but I don't think so. That would be surprising.

It really doesn't contain one...

Oh, what I meant is that I don't think that the SQL Standard
*forbids* it.

Hmmm I don't really understand this sentence. What do you mean by it?
Because the SQL standard doesn't include a one-byte, it doesn't forbid
it? :-S
Sorry, I should have been more clear:

Possibility 1:
The SQL Standard says: "There should be a one-byte integer".

Possibility 2:
The SQL Standard says: "There may not ba a one-byte integer."

Possibility 3:
The SQL Standard says nothing of the above.

You complained that possibility 1 is not the case.

I misunderstood and answered that I don't think
that possibility 2 is the case.

What I believe is that possibility 3 is true, which means
that a DMBS is free to implement a one-byte integer or not.

Seems like most chose not to do that.

Yours,
Laurenz Albe

Reply With Quote
  #15  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: One-byte integral type? - 09-08-2009 , 09:15 AM



Karsten Wutzke wrote:
Quote:
( Everything answered. Though the facts are a little strange. No one-
byte integral type, but booleans as one-byte in storage...
There is another one-byte data type: "char".

Why is that strange? Probably nobody saw a need for
a one-byte integer data type.

Yours,
Laurenz Albe

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.