.. highlightlang:: us .. _pq_nfields: pq_nfields ========== .. index:: pq_nfields .. us.tag pq_nfields NOTREADYENGLISH New550 postgres :ref:`pq_nfields` returns the number of columns in the query result. .. function:: nCols = pq_nfields(res) .. us.return **Return Value** *nCols* is the number of columns. .. us.params **Parameters** .. uparam:: res *res* is the res pointer returned by :ref:`pq_exec`. .. us.example **Example** See :ref:`pq_exec`. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.5.0 - New .. seealso:: :ref:`overview-postgresql` :sub:`id-36583`