PSQLexec (sample/psql.rb)

    # File sample/psql.rb, line 137
    def PSQLexec(ps, query)
      res = ps.db.exec(query)

      if res == nil
        printf(STDERR, "%s\n", ps.db.error())

      else
        if (res.status() == PGresult::COMMAND_OK ||
            res.status() == PGresult::TUPLES_OK)
          return res
        end

        if !ps.quiet
          printf(STDERR, "%s\n", ps.db.error())
        end

        res.clear()
      end

    end