Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [off] Zope - Please help me ! Postgre DA Field Types

Reply
Thread Tools

[off] Zope - Please help me ! Postgre DA Field Types

 
 
fowlertrainer@anonym.hu
Guest
Posts: n/a
 
      05-04-2004
Hello !

Hello !

I want to continue the my project.
http://www.zope.org/Members/fowlertrainer

I need to get all of the base field types with postgresql da.
http://www.zope.org/Members/spinwing/ZSQL_Results

rec = context.retrieve_fields_from_test_table()
print "-" * 80
print "Table field names"
print "-" * 80
for name in rec.names():
print name

print "-" * 80
print "Fields definitions"
print "-" * 80
dict = rec.data_dictionary()
for key in dict.keys():
print dict[key]

Base field types:
- char
- varchar
- int
- smallint
- bigint
- float
- decimal
- boolean
- blob
- memo
- double prec.
- text
- date
- time
- timestamp

The fields must be named f*, where * is the type of field. Example:
fint, fchar, fmemo.

Because I have not postgresql server (windows ), anybody help me
to I get the field types ?

Example - The MySQL field types:

{'name': 'fbool', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fbit', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdate', 'type': 'd', 'null': 1, 'width': 0}
{'name': 'ftime', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fdouble', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fyear', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdatetime', 'type': 'd', 'null': 1, 'width': 0}
{'name': 'finteger', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fchar', 'type': 't', 'null': 1, 'width': 0}
{'name': 'ftext', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fvarchar', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fts', 'type': 'd', 'null': 0, 'width': 0}
{'name': 'ftinyint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'id', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fblob', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fmediumint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fsmallint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fnumeric', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdecimal', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fbigint', 'type': 'l', 'null': 1, 'width': 0}
{'name': 'ffloat', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'freal', 'type': 'n', 'null': 1, 'width': 0}

Can anybody help me ?

Thanx for it.


--
Üdv/Kind of Regards:
http://www.velocityreviews.com/forums/(E-Mail Removed)
(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Lee Harr
Guest
Posts: n/a
 
      05-04-2004
On 2004-05-04, (E-Mail Removed) <(E-Mail Removed)> wrote:
> Hello !
>
> Hello !
>
> I want to continue the my project.
> http://www.zope.org/Members/fowlertrainer
>
> I need to get all of the base field types with postgresql da.
> http://www.zope.org/Members/spinwing/ZSQL_Results
>



Not exactly what you are looking for but...
http://www.postgresql.org/docs/7.4/static/datatype.html

Or maybe you could get something from the information_schema
http://www.postgresql.org/docs/7.4/s...on-schema.html
http://www.postgresql.org/docs/7.4/s...datatypes.html
http://www.postgresql.org/docs/7.4/s...a-columns.html

Probably best to ask on one of the postgres lists.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Postgre Sql Jagan Jacob Ruby 1 11-29-2010 08:36 PM
Getting binary data out of a postgre database projecktzero Python 4 06-28-2005 01:52 PM
Psycopg 1.1.17 compiled binaries for windows, postgre 8.0.0-beta4and python 2.3 =?ISO-8859-1?Q?Eino_M=E4kitalo?= Python 1 12-09-2004 10:50 AM
Connecting an Java applet to a Postgre SQL database Jesse Java 4 06-06-2004 07:22 PM
Re: [Zope-dev] Zope 2.7 running with Stackless 3.0 Shane Hathaway Python 2 08-29-2003 09:59 AM



Advertisments