Обсуждение: Data types and binary data

Поиск
Список
Период
Сортировка

Data types and binary data

От
Matthew Hagerty
Дата:
Greetings,

Sorry for the off topic question.

Where can I find a *complete* list of postgresql data types?  I have looked
all over the web site and found what seems to be a partial list.  I assume
it to be partial because I see no reference to the text, name, filename,
etc. types.

Also, is there an equivilant of the CAE specification (1992) Extended-SQL
data type binary(n)?

Thanks,
Matthew


Re: [INTERFACES] Data types and binary data

От
"Thomas G. Lockhart"
Дата:
> Where can I find a *complete* list of postgresql data types?  I have
> looked all over the web site and found what seems to be a partial
> list.  I assume it to be partial because I see no reference to the
> text, name, filename, etc. types.

Hmm. I updated the User's Guide html document on the web site the other
day, and put tar files of the html in /pub/patches/*.tar.gz

Pretty sure I don't mention "filename" in the docs, but am certain I
talk about "text" and mention "name" in passing. Look inside the chapter
on Data Types, in the section on Character Types.

I also forgot to discuss the "oid" type; if there are any others missing
from the docs let me know. Others should speak up too if they see
omissions; that's "my" chapter :)

> Also, is there an equivilant of the CAE specification (1992)
> Extended-SQL data type binary(n)?

Don't know. What does it do? Is the same as a blob? If so, then you need
to use the large object interface.

                      - Tom

Re: [INTERFACES] Data types and binary data

От
James Olin Oden
Дата:
> I also forgot to discuss the "oid" type; if there are any others missing
> from the docs let me know. Others should speak up too if they see
> omissions; that's "my" chapter :)

Well, I don't know if it belongs in that chapter, but I have been unable to
find anything documented concerning the catalogues.  The other day someone
sent an email with a shell script that did a select onpg_database (which I
did not know existed).  It was really cool, because, he could get the list
of the database names, and insure that he truly backed _everything_ up.
Anyway, I would like to see that part of the postgres documented (if its not
already, and I have just not looked hard enough).

Thanks...james



Re: [INTERFACES] Data types and binary data

От
Tom Good
Дата:
On Wed, 19 Aug 1998, Matthew Hagerty wrote:

> Where can I find a *complete* list of postgresql data types?  I have looked
> all over the web site and found what seems to be a partial list.  I assume
> it to be partial because I see no reference to the text, name, filename,
> etc. types.

Hi.

output from \dT at the isql (psql) prompt...

type     |description
---------+-------------------------------------------------------------
SET      |set of tuples
abstime  |absolute, limited-range date and time (Unix system time)
aclitem  |access control list
bool     |boolean 'true'/'false'
box      |geometric box '(lower left,upper right)'
bpchar   |blank-padded characters, length specifed when created
bytea    |variable length array of bytes
char     |single character
char16   |16 characters, fixed length
char2    |2 characters
char4    |4 characters
char8    |8 characters
cid      |command identifier type, sequence in transaction id
circle   |geometric circle '(center,radius)'
date     |ANSI SQL date 'yyyy-mm-dd'
datetime |date and time 'yyyy-mm-dd hh:mm:ss'
filename |filename used in system tables
float4   |single-precision floating point number, 4-byte
float8   |double-precision floating point number, 8-byte
int2     |two-byte integer, -32k to 32k
int28    |8 2-byte integers, used internally
int4     |4-byte integer, -2B to 2B
line     |geometric line '(pt1,pt2)'
lseg     |geometric line segment '(pt1,pt2)'
money    |money '$d,ddd.cc'
name     |31-character type for storing system identifiers
oid      |object identifier type
oid8     |array of 8 oid, used in system tables
oidint2  |oid and int2 composed
oidint4  |oid and int4 composed
oidname  |oid and name composed
path     |geometric path '(pt1,...)'
point    |geometric point '(x, y)'
polygon  |geometric polygon '(pt1,...)'
regproc  |registered procedure
reltime  |relative, limited-range time interval (Unix delta time)
smgr     |storage manager
text     |native variable-length string
tid      |tuple identifier type, physical location of tuple
time     |ANSI SQL time 'hh:mm:ss'
timespan |time interval '@ <number> <units>'
timestamp|limited-range ISO-format date and time
tinterval|time interval '(abstime,abstime)'
unknown  |
varchar  |non-blank-padded-length string, length specified when created
xid      |transaction id
(46 rows)


 Cheers,
 Tom

    ----------- Sisters of Charity Medical Center ----------
                    Department of Psychiatry
                              ----
 Thomas Good, System Administrator            <tomg@q8.nrnet.org>
 North Richmond CMHC/Residential Services     Phone: 718-354-5528
 75 Vanderbilt Ave, Quarters 8                Fax:   718-354-5056
 Staten Island, NY   10304                    www.panix.com/~ugd
                              ----
 Powered by PostgreSQL 6.3.2 / Perl 5.004 / DBI-0.91::DBD-PG-0.69