Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Database - PSQL Command

    General and Desktop
    2
    2
    528
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fgdevel last edited by

      Hello,

      In my Qt application, I'm using a PostgreSQL database, and I would like to know if it's possible to run a command as I do through the psql console ? (example : "\copy (select * from variable) To '/tmp/export_bdd.csv' With CSV")

      Thanks.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi

        One way to do that is to use QProcess to call the psql command with what you want.

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post