[Jc @sdZddkZddkZddkZddkZddklZlZlZl Z ddk l Z l Z ddk lZlZddk lZddklZdeifd YZd eifd YZd eifd YZdeifdYZdeifdYZdeifdYZdeifdYZdefdYZ dei!fdYZ"dei#fdYZ$dei%fdYZ&deifdYZ'd ei(fd!YZ)d"ei*fd#YZ+d$ei,fd%YZ-d&ei.fd'YZ/d(ei0fd)YZ1d*eifd+YZ2d,eifd-YZ3d.ei4ei5eifd/YZ6h eei6eei6eei6eei6e"ei!6e$ei#6e&ei%6e+ei*6e/ei.6e1ei06e)ei(6e-ei,6Z7hed06e d16ed26e+d36e-d46e-d56e-d66e)d76ed86ed96ed:6ed;6ed<6e3d=6e2d>6ed?6ed@6e"dA6e"dB6e"dC6e&dD6e&dE6e$dF6e&dG6e/dH6e1dI6e'dJ6Z8ei9dKei:ei;BZ<dLe i=fdMYZ>dNe i?fdOYZ@dPeiAfdQYZBdReiCfdSYZDdTeiEfdUYZFdVe iGfdWYZHdXeiIfdYYZJe@ZKeBeK_LeDeK_MeFeK_NeJeK_OeHeK_Pe>eK_QdS(Zs= Support for the PostgreSQL database. Driver ------ The psycopg2 driver is supported, available at http://pypi.python.org/pypi/psycopg2/ . The dialect has several behaviors which are specifically tailored towards compatibility with this module. Note that psycopg1 is **not** supported. Connecting ---------- URLs are of the form `postgres://user:password@host:port/dbname[?key=value&key=value...]`. PostgreSQL-specific keyword arguments which are accepted by :func:`~sqlalchemy.create_engine()` are: * *server_side_cursors* - Enable the usage of "server side cursors" for SQL statements which support this feature. What this essentially means from a psycopg2 point of view is that the cursor is created using a name, e.g. `connection.cursor('some name')`, which has the effect that result rows are not immediately pre-fetched and buffered after statement execution, but are instead left on the server and only retrieved as needed. SQLAlchemy's :class:`~sqlalchemy.engine.base.ResultProxy` uses special row-buffering behavior when this feature is enabled, such that groups of 100 rows at a time are fetched over the wire to reduce conversational overhead. Sequences/SERIAL ---------------- PostgreSQL supports sequences, and SQLAlchemy uses these as the default means of creating new primary key values for integer-based primary key columns. When creating tables, SQLAlchemy will issue the ``SERIAL`` datatype for integer-based primary key columns, which generates a sequence corresponding to the column and associated with it based on a naming convention. To specify a specific named sequence to be used for primary key generation, use the :func:`~sqlalchemy.schema.Sequence` construct:: Table('sometable', metadata, Column('id', Integer, Sequence('some_id_seq'), primary_key=True) ) Currently, when SQLAlchemy issues a single insert statement, to fulfill the contract of having the "last insert identifier" available, the sequence is executed independently beforehand and the new value is retrieved, to be used in the subsequent insert. Note that when an :func:`~sqlalchemy.sql.expression.insert()` construct is executed using "executemany" semantics, the sequence is not pre-executed and normal PG SERIAL behavior is used. PostgreSQL 8.3 supports an ``INSERT...RETURNING`` syntax which SQLAlchemy supports as well. A future release of SQLA will use this feature by default in lieu of sequence pre-execution in order to retrieve new primary key values, when available. INSERT/UPDATE...RETURNING ------------------------- The dialect supports PG 8.3's ``INSERT..RETURNING`` and ``UPDATE..RETURNING`` syntaxes, but must be explicitly enabled on a per-statement basis:: # INSERT..RETURNING result = table.insert(postgres_returning=[table.c.col1, table.c.col2]).\ values(name='foo') print result.fetchall() # UPDATE..RETURNING result = table.update(postgres_returning=[table.c.col1, table.c.col2]).\ where(table.c.name=='foo').values(name='bar') print result.fetchall() Indexes ------- PostgreSQL supports partial indexes. To create them pass a postgres_where option to the Index constructor:: Index('my_index', my_table.c.id, postgres_where=tbl.c.value > 10) Transactions ------------ The PostgreSQL dialect fully supports SAVEPOINT and two-phase commit operations. iN(tsqltschematexctutil(tbasetdefault(tcompilert expression(t operators(ttypestPGInetcBseZdZRS(cCsdS(NtINET((tself((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt get_col_specfs(t__name__t __module__R (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR estPGCidrcBseZdZRS(cCsdS(NtCIDR((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR js(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRist PGMacAddrcBseZdZRS(cCsdS(NtMACADDR((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR ns(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRmst PGNumericcBs#eZdZdZdZRS(cCs/|ipdSdh|id6|id6SdS(NtNUMERICs!NUMERIC(%(precision)s, %(scale)s)t precisiontscale(RR(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR rs cCsdS(N(tNone(R tdialect((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytbind_processorxscCs |iodSd}|SdS(NcSs&t|tio t|S|SdS(N(t isinstancetdecimaltDecimaltfloat(tvalue((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytprocesss (t asdecimalR(R RR ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytresult_processor{s  (RRR RR"(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRqs  tPGFloatcBseZdZRS(cCs%|ipdSdh|id6SdS(NtFLOATsFLOAT(%(precision)s)R(R(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s (RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR#st PGIntegercBseZdZRS(cCsdS(NtINTEGER((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR%stPGSmallIntegercBseZdZRS(cCsdS(NtSMALLINT((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR'st PGBigIntegercBseZdZRS(cCsdS(NtBIGINT((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR)st PGDateTimecBseZdZRS(cCsd|iodpddS(Ns TIMESTAMP tWITHtWITHOUTs TIME ZONE(ttimezone(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR+stPGDatecBseZdZRS(cCsdS(NtDATE((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR/stPGTimecBseZdZRS(cCsd|iodpddS(NsTIME R,R-s TIME ZONE(R.(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR1st PGIntervalcBseZdZRS(cCsdS(NtINTERVAL((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR2stPGTextcBseZdZRS(cCsdS(NtTEXT((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR4stPGStringcBseZdZRS(cCs%|iodh|id6SdSdS(NsVARCHAR(%(length)d)tlengthtVARCHAR(R7(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s (RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR6stPGCharcBseZdZRS(cCs%|iodh|id6SdSdS(NsCHAR(%(length)d)R7tCHAR(R7(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s (RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR9stPGBinarycBseZdZRS(cCsdS(NtBYTEA((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR;st PGBooleancBseZdZRS(cCsdS(NtBOOLEAN((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR=stPGBitcBseZdZRS(cCsdS(NtBIT((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR?stPGUuidcBseZdZRS(cCsdS(NtUUID((R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s(RRR (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRAstPGArraycBsSeZedZdZdZdZdZdZdZ dZ RS(cCs3t|to |}n||_||_dS(N(Rttypet item_typetmutable(R RERF((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt__init__s  cCs/|djodS|io t|S|SdS(N(RRFtlist(R R((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt copy_values    cCs ||jS(N((R txty((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytcompare_valuesscCs|iS(N(RF(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt is_mutablescKsA|ii|i}|ii|i|ii||_|S(N(t __class__t__new__t__dict__tupdateREt dialect_impl(R Rtkwargstimpl((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRRscs%|ii|fd}|S(NcsI|djo|Sfdg}|D]}||q/~S(NcsVt|ttfo&g}|D]}||q!~So |S|SdS(N(RRHttuple(titemt_[1]tchild(t convert_itemt item_proc(sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRYs & (R(RRWRV(RZ(RYsA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s (RER(R RR ((RZsA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRs cs%|ii|fd}|S(NcsI|djo|Sfdg}|D]}||q/~S(NcsPt|to&g}|D]}||q~So |S|SdS(N(RRH(RVRWRX(RZRY(sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRYs & (R(RRWRV(RZ(RYsA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s (RER"(R RR ((RZsA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR"s cCs|iidS(Ns[](RER (R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR s( RRtTrueRGRIRLRMRRRR"R (((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRCs       tintegertbiginttsmallintscharacter varyingt characters"char"tnamettexttnumericRtrealtinettcidrtuuidtbittmacaddrsdouble precisiont timestampstimestamp with time zonestimestamp without time zonestime with time zonestime without time zonetdatettimetbyteatbooleantintervals \s*SELECTtPGExecutionContextcBseZdZdZRS(cCs|iio{|io3t|iitiot|iidt p>|i pt|iiti o|iot i |i}||_ |oJdt t|dt tidddf}|iii|S|iiiSdS(Nt for_updatesc_%s_%siii(Rtserver_side_cursorstcompiledRt statementRt SelectabletgetattrtFalset _TextClausetSERVER_SIDE_CURSOR_REtmatcht#_PGExecutionContext__is_server_sidethextidtrandomtrandintt _connectiont connectiontcursor(R tis_server_sidetident((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt create_cursor<s #$ 6cCs)|ioti|Sti|SdS(N(RzRtBufferedRowResultProxyt ResultProxy(R ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytget_result_proxyQs (RRRR(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRo;s t PGDialectcBseZdZeZeZdZeZeZ eZ eZ dZ eZ eZedZdZeeZdZdZdZdZeed Zeed Zd Zd ZeideZdZddZdZdZ dZ!dZ"dZ#dZ$RS(tpostgresi?tpyformatcKs tii||||_dS(N(RtDefaultDialectRGRq(R RqRS((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRGdscCsddk}|S(Ni(tpsycopg2(tclstpsycopg((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytdbapihs cCsQ|idd}d|jot|d|d|i#|$}%|i$i%|%|%i&djo t|%_'q{qqWd#}&ti|&dht i d$6t i d%6}"|i |"d"|} x| iD]\}'}(tid&|(i(})|)\}*}+},}-g}.tid'|*D]}/|.|i)|/q~.}*|+o|i)|+}+n7|idj o&|i|i*|jo |i}+n|i)|,},g}0tid(|-D]}/|0|i)|/q~0}-g}1|+dj oYti+|,|i,d)td|+d*|x}|-D]%}2|1idi-|+|,|2gqWnMti+|,|i,d)td*|x*|-D]"}2|1idi-|,|2gqcW|i.ti/|*|1|'d+tqWd,}3ti|3dht i d 6}"|i |"d"|} h}4d}5x| iD]}#|#\}6}7}8}9}%|8o/|6|5jptid-|6n|6}5qn|9o)|6|5j otid.|6|6}5n|4i0|6p|7gg|4|6 0 AND NOT a.attisdropped ORDER BY a.attnum RRttype_RttypemaptattnameRs ([^\([]+)is[]s \(([\d,]+)\)Rbt,sdouble precisioni5R\i istimestamp with time zoneR.stimestamp without time zonetattypetnullables*Did not recognize type '%s' of column '%s's(nextval\(')([^']+)('.*$)t.is"%s"is SELECT attname FROM pg_attribute WHERE attrelid = ( SELECT indexrelid FROM pg_index i WHERE i.indrelid = :table AND i.indisprimary = 't') ORDER BY attnum ttables SELECT conname, pg_catalog.pg_get_constraintdef(oid, true) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = :table AND r.contype = 'f' ORDER BY 1 tconnametcondefs;FOREIGN KEY \((.*?)\) REFERENCES (?:(.*?)\.)?(.*?)\((.*?)\)s\s*,\s*s\s*,\stautoloadt autoload_witht link_to_names> SELECT c.relname, i.indisunique, i.indexprs, i.indpred, a.attname FROM pg_index i, pg_class c, pg_attribute a WHERE i.indrelid = :table AND i.indexrelid = c.oid AND a.attrelid = i.indexrelid AND i.indisprimary = 'f' ORDER BY c.relname, a.attnum s;Skipped unsupported reflection of expression-based index %ss7Predicate of partial index %s ignored during reflectiontunique(NN(i i(5tidentifier_preparerRRRRRRRRaRRtUnicodeR`RtfetchallRtNoSuchTableErrort _load_domainsRtsearchRtendswithRvtsplittappendRR[t ischema_namesRCRtwarntNULLTYPEt DefaultClauset append_columntColumntct primary_keytaddRt autoincrementtgroupst_unquote_identifierRtTabletmetadatatjointappend_constrainttForeignKeyConstraintthas_keytitemstIndextcolumnstdict(<R RRtinclude_columnstpreparertschema_where_clauset schemanametSQL_COLSRt tablenameRtrowstdomainsR`t format_typeRtnotnulltattnumt table_oidRRtis_arraytcharlent numericprect numericscaletargstaRStcoltypetdomaintcolargsRytschtPK_SQLttRtpktcoltFK_SQLRRRtconstrained_columnstreferred_schematreferred_tabletreferred_columnsRWRJt_[2]trefspectcolumntIDX_SQLtindexest sv_idx_nametidx_nameRtexprtprdRt_[3]((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt reflecttables    Y                         #=#&    ) 6) 6 ' &      .c Csd}ti|dhtid6}|i|}h}x|iD]}}tid|did}|do|d}nd |d |df}h|d6|d d 6|d d 6||scCs$d||f|o d|pdS(s%s NOT ILIKE %ss ESCAPE '%s'R7((RJRKR8((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR9scCsd||fS(s%s @@ to_tsquery(%s)((RJRK((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR9stmessages0Use a literal string 'timestamp ' insteadcCsd|S(s TIMESTAMP %s((RJ((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR9st TIMESTAMPcCs'|iodSd|ii|SdS(Ns nextval('%s')(toptionalRRtformat_sequence(R tseq((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytvisit_sequences cCs.d|jotidn|iddS(Ns%%s\The SQLAlchemy psycopg2 dialect now automatically escapes '%' in text() expressions to '%%'.t%(RRtreplace(R Ra((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytpost_process_texts cCs~d}|idj o|dt|i7}n|idj o9|idjo|d7}n|dt|i7}n|S(NR7s LIMIT s LIMIT ALLs OFFSET (t_limitRRt_offset(R tselectRa((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt limit_clausescCs|iot|itodSt|ittfoTddig}|iD]-}|t|to|p |i|qR~dSdt|idSndSdS(Ns DISTINCT s DISTINCT ON (s, s) R7( t _distinctRRRHRURt basestringR tunicode(R RERWR((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytget_select_precolumnss TcCs/|idjodStt|i|SdS(Ntnowaits FOR UPDATE NOWAIT(RptsuperR6tfor_update_clause(R RE((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRMscCsj|id}d}g}||D]}||i|dtq'~}|dti|d7}|S(Ntpostgres_returningcssJxC|D];}t|tiox|iD] }|Vq*Wq|VqWdS(N(RRRtR(tcollistRtco((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytflatten_columnlists  twithin_columns_clauses RETURNING s, (RSR R[tstringR(R Ratstmttreturning_colsRQRWRR((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt_append_returnings   6cCsAtt|i|}d|ijo|i||S|SdS(NRN(RLR6t visit_updateRSRV(R t update_stmtRa((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRW scCsAtt|i|}d|ijo|i||S|SdS(NRN(RLR6t visit_insertRSRV(R t insert_stmtRa((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRYscKs5|ii|i|i}d||i|ifS(NsEXTRACT(%s FROM %s::timestamp)(t extract_maptgettfieldR R$(R textractRSR]((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt visit_extractsN(RRRtDefaultCompilerRtcopyRQt sql_operatorstmodRtilike_opt notilike_optmatch_opt functionsRt deprecatedR?RBRFRJRMRVRWRYR_(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR6s(       tPGSchemaGeneratorcBs#eZdZdZdZRS(cKs8|ii|}|iot|idjo|iot|iti oyt|iti  ob|i djp#t|i t io<|i io/t|ito|d7}q|d7}nR|d|ii|ii7}|i|}|dj o|d|7}n|ip|d7}n|S(Nis BIGSERIALs SERIALt s DEFAULT s NOT NULL(Rt format_columnRtlent foreign_keysRRRDRtIntegert SmallIntegerRRRtSequenceR<R)RRRR tget_column_default_stringR(R RRStcolspecR((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytget_column_specification!s#  cCsb|i oS|i p|ii|i|i o+|id|ii||i ndS(NsCREATE SEQUENCE %s( R<t checkfirstRRRR`RRR=R(R tsequence((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR?2s3c CsH|i}|id|io|idn|id|i|i|it|i|i|it i g}|i D]}||i |q~~df|i idd}|dj op|i|d}t|tg}|iiD]\}} ||| ifq~} |id| n|idS(NsCREATE sUNIQUE sINDEX %s ON %s (%s)s, tpostgres_wheres WHERE (RRRtquotet_validate_identifierR`R[t format_tableRRSRRRkRSR\Rt_compileRRtbindst iteritemsRR( R tindexRRWRt whereclauseRRtkeytbindtinlined_clause((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyt visit_index7s    !>  =(RRRsR?R(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRi s  tPGSchemaDroppercBseZdZRS(cCsa|i oR|i p|ii|i|io+|id|ii||i ndS(NsDROP SEQUENCE %s( R<RtRRRR`RRR=R(R Ru((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR?Js2(RRR?(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRIstPGDefaultRunnercBs&eZdZedZdZRS(cCs,tii|||iii|_dS(N(Rt DefaultRunnerRGRRR(R R((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRGPscCs'|iot|itio+|iidj o|id|iiSt|it i o:|i o|i djp#t|i ti o||i ioo|ii}|dj o d||ii|if}nd|ii|if}|i|i|iiSntt|i|S(Ns select %ss"select nextval('"%s"."%s_%s_seq"')sselect nextval('"%s_%s_seq"')(RRtserver_defaultRRtargRtexecute_stringRDRRnRRRpR<RR`RRRRLRtget_column_default(R RtisinsertRR((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRUs S   !cCs3|ip!|id|iii|SdSdS(Nsselect nextval('%s')(R<RRRR=R(R R>((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyR?gs !(RRRGR[RR?(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyROs  tPGIdentifierPreparercBseZdZRS(cCs5|d|ijo|dd!idd}n|S(Niiis""t"(t initial_quoteRA(R R((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRns(RRR(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pyRms(Rt__doc__RR}RRSt sqlalchemyRRRRtsqlalchemy.engineRRtsqlalchemy.sqlRRRRbR Rt TypeEngineR RRtNumericRtFloatR#RnR%t SmallintegerR'R)tDateTimeR+tDateR/tTimeR1R2tTextR4tStringR6R:R9tBinaryR;tBooleanR=R?RAt MutableTypet ConcatenableRCRRtcompiletItUNICODERxtDefaultExecutionContextRoRRR`R6tSchemaGeneratorRit SchemaDropperRRRtIdentifierPreparerRRtstatement_compilertschemageneratort schemadropperRt defaultrunnertexecution_ctx_cls(((sA/usr/lib/python2.6/site-packages/sqlalchemy/databases/postgres.pytZs0"%=             o[)