<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">
<document>
 <header>
  <title>Quick Start</title>
 </header>
 <body>
  <p>
   While these should work if you just paste the blocks into a terminal,
   it is recommended that you check them over and run each command one at
   a time.
  </p>
  <section>
   <title>Fetch and Install pg_proboscis</title>
<source xml:space="preserve"><![CDATA[
easy_install pg_proboscis
]]></source>
  </section>
  <section>
   <title>Connect to a database with the frontend</title>
<source xml:space="preserve"><![CDATA[import postgresql.interface.proboscis.prime as pq
Con = pq.Connector(
 user = 'root',
 host = 'localhost',
 port = 5432,
 ssl = True, # Optional. Only set it to True if you want it.
 database = 'pgsql',
)
# This creates a Connection *class*, it still needs to be instantiated.
C = Con()
C
<PostgreSQL 8.0.3 [pq://jwp@localhost:5432]>

# Let's query the database; your results may vary.
Q = C.Query("SELECT * FROM pg_proc WHERE proname = $1")
P = Q('byteain')
for x in P: print x
('byteain'::name, '11'::oid, '1'::int4, '12'::oid, False, False, True, False,
'i'::char, '1'::int2, '17'::oid, '2275'::oidvector, None, 'byteain'::text,
'-'::bytea, '{=X/pgsql}'::_aclitem)
print type(x)
(proname name, pronamespace oid, proowner int4, prolang oid, proisagg bool,
prosecdef bool, proisstrict bool, proretset bool, provolatile char, pronargs
int2, prorettype oid, proargtypes oidvector, proargnames _text, prosrc text,
probin bytea, proacl _aclitem,)

print repr(x["proname"])
'byteain'::name
print repr(x[0])
'byteain'::name

for y in x: print repr(y)

'byteain'::name
'11'::oid
'1'::int4
'12'::oid
False
False
True
False
'i'::char
'1'::int2
'17'::oid
'2275'::oidvector
None
'byteain'::text
'-'::bytea
'{=X/pgsql}'::_aclitem

print x["proacl"][0]
=X/pgsql

#
# Please be sure to see the documentation for more details.
##
]]></source>
  </section>
 </body>
</document><!--
 ! vim: ts=1:sw=1:et:
 !-->