+
    TjS-                         ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ]! R. ]P                  ORNRN4      t]! R	. ]P                  ORN4      t ! R
 R]4      tR# )    )
namedtuple)BaseDatabaseIntrospection)	FieldInfo)	TableInfo)Indexr   is_autofieldcommentr   c                      a a ] tR t^t o/ ^Rb^Rb^Rb^Rb^Rb^RbRRbR	RbR
RbRRbRRbRRbRRbRRbRRbRRbRRbRRRRRR/CtRt. tV 3R  ltR! tR" t	R'R# lt
R$ tR% tR&tVtV ;t# )(DatabaseIntrospectionBooleanFieldBinaryFieldBigIntegerFieldSmallIntegerFieldIntegerField	TextFieldi  
FloatFieldi  ie  GenericIPAddressFieldi  	CharFieldi  i:  	DateFieldi;  	TimeFieldiZ  DateTimeFieldi  i  DurationFieldi  i  DecimalFieldi  	UUIDFieldi  	JSONFieldbtreec                   < \         SV `  W4      pVP                  '       g$   VP                  '       d-   R VP                  9   d   VR8X  d   R# VR8X  d   R# VR8X  d   R# V# )nextvalr   	AutoFieldr   BigAutoFieldr   SmallAutoField)superget_field_typer   default)self	data_typedescription
field_type	__class__s   &&& `/var/www/idalgo/venv/lib/python3.14/site-packages/django/db/backends/postgresql/introspection.pyr#   $DatabaseIntrospection.get_field_type)   sa    W+IC
###[000^+"00%22'    c                    VP                  R4       VP                  4        Uu. uF&  pV^ ,          V P                  9  g   K  \        V!  NK(  	  up# u upi )z>Return a list of table and view names in the current database.aB  
            SELECT
                c.relname,
                CASE
                    WHEN c.relispartition THEN 'p'
                    WHEN c.relkind IN ('m', 'v') THEN 'v'
                    ELSE 't'
                END,
                obj_description(c.oid, 'pg_class')
            FROM pg_catalog.pg_class c
            LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
            WHERE c.relkind IN ('f', 'm', 'p', 'r', 'v')
                AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
                AND pg_catalog.pg_table_is_visible(c.oid)
        )executefetchallignored_tablesr   )r%   cursorrows   && r*   get_table_list$DatabaseIntrospection.get_table_list8   sY    	
& (
(1vT000 IsO(
 	
 
s   AAc                0   VP                  RV.4       VP                  4        Uu/ uF  q3^ ,          VR,          bK  	  ppVP                  RV P                  P                  P	                  V4      ,          4       VP
                   Uu. uF{  p\        VP                  VP                  VP                  f   VP                  MVP                  VP                  VP                  VP                  .WCP                  ,          O5!  NK}  	  up# u upi u upi )zQ
Return a description of the table with the DB-API cursor.description
interface.
a  
            SELECT
                a.attname AS column_name,
                NOT (a.attnotnull OR (t.typtype = 'd' AND t.typnotnull)) AS is_nullable,
                pg_get_expr(ad.adbin, ad.adrelid) AS column_default,
                CASE WHEN collname = 'default' THEN NULL ELSE collname END AS collation,
                a.attidentity != '' AS is_autofield,
                col_description(a.attrelid, a.attnum) AS column_comment
            FROM pg_attribute a
            LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
            LEFT JOIN pg_collation co ON a.attcollation = co.oid
            JOIN pg_type t ON a.atttypid = t.oid
            JOIN pg_class c ON a.attrelid = c.oid
            JOIN pg_namespace n ON c.relnamespace = n.oid
            WHERE c.relkind IN ('f', 'm', 'p', 'r', 'v')
                AND c.relname = %s
                AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
                AND pg_catalog.pg_table_is_visible(c.oid)
        :   NNzSELECT * FROM %s LIMIT 1)r.   r/   
connectionops
quote_namer'   r   name	type_codedisplay_sizeinternal_size	precisionscale)r%   r1   
table_nameline	field_maps   &&&  r*   get_table_description+DatabaseIntrospection.get_table_descriptionQ   s     	& L)	
, 4:??3DE3D4!Wd2h&3D	E&)<)<)G)G
)SS	
 **
 + 		&*&7&7&?""TEVEV""

	 99%	 +
 	
	 F
s   D
BDc           
         VP                  R V.4       VP                  4        Uu. uF  pRV^ ,          RVRV^,          /NK  	  up# u upi )a  
            SELECT
                s.relname AS sequence_name,
                a.attname AS colname
            FROM
                pg_class s
                JOIN pg_depend d ON d.objid = s.oid
                    AND d.classid = 'pg_class'::regclass
                    AND d.refclassid = 'pg_class'::regclass
                JOIN pg_attribute a ON d.refobjid = a.attrelid
                    AND d.refobjsubid = a.attnum
                JOIN pg_class tbl ON tbl.oid = d.refobjid
                    AND tbl.relname = %s
                    AND pg_catalog.pg_table_is_visible(tbl.oid)
            WHERE
                s.relkind = 'S';
        r:   tablecolumnr.   r/   )r%   r1   r@   table_fieldsr2   s   &&&& r*   get_sequences#DatabaseIntrospection.get_sequences   s]    " L%	
, (
( SVWj(CFC(
 	
 
s   Ac                    VP                  RV.4       VP                  4        Uu/ uF  q3^ ,          V^,          V^,          3bK  	  up# u upi )z~
Return a dictionary of {field_name: (field_name_other_table,
other_table)} representing all foreign keys in the given table.
a{  
            SELECT a1.attname, c2.relname, a2.attname
            FROM pg_constraint con
            LEFT JOIN pg_class c1 ON con.conrelid = c1.oid
            LEFT JOIN pg_class c2 ON con.confrelid = c2.oid
            LEFT JOIN
                pg_attribute a1 ON c1.oid = a1.attrelid AND a1.attnum = con.conkey[1]
            LEFT JOIN
                pg_attribute a2 ON c2.oid = a2.attrelid AND a2.attnum = con.confkey[1]
            WHERE
                c1.relname = %s AND
                con.contype = 'f' AND
                c1.relnamespace = c2.relnamespace AND
                pg_catalog.pg_table_is_visible(c1.oid)
        rH   )r%   r1   r@   r2   s   &&& r*   get_relations#DatabaseIntrospection.get_relations   sS    
 	 L!	
$ 5;OO4EF4ESAQQ((4EFFFs   "Ac                h   / pVP                  RV.4       VP                  4        FF  w  rErgpRTRVR8H  RVR9   RVR8X  d   \        VP                  R^4      4      MR	R
VR8H  RRRR	RV/W4&   KH  	  VP                  RV P                  V.4       VP                  4        F  w  p	pp
pppppW9  g   K  WP                  8H  ;'       d#    V	P                  R4      '       * ;'       d    VR	J pRVR	.8w  d   TM. RVR	.8w  d   TM. RTRT
RR	R
RRRRV'       d   \        P                  MTRVRV/
W9&   K  	  V# )z
Retrieve any constraints or keys (unique, pk, fk, check, index) across
one or more columns. Also retrieve the definition of expression-based
indexes.
aH  
            SELECT
                c.conname,
                array(
                    SELECT attname
                    FROM unnest(c.conkey) WITH ORDINALITY cols(colid, arridx)
                    JOIN pg_attribute AS ca ON cols.colid = ca.attnum
                    WHERE ca.attrelid = c.conrelid
                    ORDER BY cols.arridx
                ),
                c.contype,
                (SELECT fkc.relname || '.' || fka.attname
                FROM pg_attribute AS fka
                JOIN pg_class AS fkc ON fka.attrelid = fkc.oid
                WHERE fka.attrelid = c.confrelid AND fka.attnum = c.confkey[1]),
                cl.reloptions
            FROM pg_constraint AS c
            JOIN pg_class AS cl ON c.conrelid = cl.oid
            WHERE cl.relname = %s AND pg_catalog.pg_table_is_visible(cl.oid)
        columnsprimary_keypuniqueforeign_keyf.NcheckcindexF
definitionoptionsaa  
            SELECT
                indexname,
                array_agg(attname ORDER BY arridx),
                indisunique,
                indisprimary,
                array_agg(ordering ORDER BY arridx),
                amname,
                exprdef,
                s2.attoptions
            FROM (
                SELECT
                    c2.relname as indexname, idx.*, attr.attname, am.amname,
                    CASE
                        WHEN idx.indexprs IS NOT NULL THEN
                            pg_get_indexdef(idx.indexrelid)
                    END AS exprdef,
                    CASE am.amname
                        WHEN %s THEN
                            CASE (option & 1)
                                WHEN 1 THEN 'DESC' ELSE 'ASC'
                            END
                    END as ordering,
                    c2.reloptions as attoptions
                FROM (
                    SELECT *
                    FROM
                        pg_index i,
                        unnest(i.indkey, i.indoption)
                            WITH ORDINALITY koi(key, option, arridx)
                ) idx
                LEFT JOIN pg_class c ON idx.indrelid = c.oid
                LEFT JOIN pg_class c2 ON idx.indexrelid = c2.oid
                LEFT JOIN pg_am am ON c2.relam = am.oid
                LEFT JOIN
                    pg_attribute attr ON attr.attrelid = c.oid AND attr.attnum = idx.key
                WHERE c.relname = %s AND pg_catalog.pg_table_is_visible(c.oid)
            ) s2
            GROUP BY indexname, indisunique, indisprimary, amname, exprdef, attoptions;
        _btreeordersTtype)rR   u)r.   r/   tuplesplitindex_default_access_methodendswithr   suffix)r%   r1   r@   constraints
constraintrP   kind	used_colsr[   rY   rS   primaryr]   type_rZ   basic_indexs   &&&             r*   get_constraints%DatabaseIntrospection.get_constraints   s     	( L+	
. >D__=N9J'7ts{$*,uY__S!%<=RVd7	'K# >O 	'P --z:S*	
h __	
'=== ( ( x00	( (
  4  'dV*;w4&(8fb!7f!4UTKELLU *w&" , r,    )rn   )__name__
__module____qualname____firstlineno__data_types_reverserb   r0   r#   r3   rC   rJ   rM   rl   __static_attributes____classdictcell____classcell__)r)   __classdict__s   @@r*   r   r      s"    
N
M 	 		
 	N 	K 	\ 	\ 	$ 	k 	k 	k 	k 	o 	o  	o!" 	k#$ 	nkk). #*N
2.
`
4G2w wr,   r   N)collectionsr   %django.db.backends.base.introspectionr   r   BaseFieldInfor   BaseTableInfodjango.db.modelsr   _fieldsr   rn   r,   r*   <module>r~      sb    " K L L "{$Wm&;&;$W^$WY$WX	{$Gm&;&;$GY$GH	_5 _r,   