Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012
    Posts
    34

    Unanswered: How to remove Query's Output as "SELECT"?

    Hi to All,

    could SomeOne resolve this problem?

    I send this pgsql command with the queries containet in the file ctrs.sql :
    Code:
    export PGPASSWORD="123" && /opt/PostgreSQL/9.3/bin/psql -U  postgres --file /SQL/ctrs.sql MYDB
    But, as output, before of the output of the query I see something like this:

    Code:
    DROP VIEW
    CREATE VIEW
    CREATE VIEW
    SELECT 18
    SELECT 1
    SELECT 1
    I should not see the above output, but only the query result.

    How is it possible?

    Tanks in advance.

    Gerolamo

  2. #2
    Join Date
    Nov 2003
    Posts
    2,988
    Provided Answers: 23
    Code:
    psql --help
    psql is the PostgreSQL interactive terminal.
    
    Usage:
      psql [OPTION]... [DBNAME [USERNAME]]
    
    General options:
    ...
    
    Input and output options:
    ...
      -q, --quiet              run quietly (no messages, only query output)
    
    ...
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  3. #3
    Join Date
    Dec 2012
    Posts
    34
    Hi Shammat,
    Your Work is the Best Work.
    Hope every good for You.

    Many tanks.
    Humbly.
    Gianni Pinna Gerolamo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •