Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8351925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:47:51+00:00 2026-06-09T08:47:51+00:00

I get an error while executing the following psql statement inside a bash script:

  • 0

I get an error while executing the following psql statement inside a bash script:

execlog "psql -h $HOST -p $PORT -U $USER -d $DB -q -c 'CREATE EXTENSION hstore;'"

The raised error is:

ERROR: unterminated quoted string at or near “‘CREATE”
LINE 1: ‘CREATE
^

Thus, the single terminating quote is not recognize as it should be.
When using escaped double quotes instead single quotes (…\”CREATE EXTENSION hstore;\”) I get the same error.
When executing the command directly from the command line, everything works fine.

Does someone know what’s going wrong?

To give some additional info:

OS: Ubuntu 11.10, Postgresql Verion: 9.1

Thanks in advance,
Richard

Solved: The execlog function produces the error. Now I am calling

log "exec psql -h $HOST -p $PORT -U $USER -d $DB -q -c 'CREATE EXTENSION hstore;'"

which works fine!

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:47:53+00:00Added an answer on June 9, 2026 at 8:47 am

    The problem is that after quote removal, the single quotes are no longer treated as syntax to escape the space, but literal characters as part of the string. Try

    execlog psql -h $HOST -p $PORT -U $USER -d $DB -q -c 'CREATE EXTENSION hstore;'
    

    (I can’t find any information on execlog, so I don’t know if the above will work.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while executing the following query, i get an error that there's an error in
I get an off by one error while executing the following code #include <iostream>
While executing the following statement to bind my database to my datagridview, I get
While executing a 3rd party c++ program I get the following error: error while
I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class
I'm trying to create a database. But i get an error while i'm doing.
I'm building a file management app, and I occasionally get the following error while
While building my CUDA project I get the following error: cutil_inline_runtime.h(328): error: identifier CURAND_STATUS_DOUBLE_PRECISION_REQUIRED
I got the following output with error message while executing the program that uses
I'm getting the following error while executing database query: Error Number: 1062 Duplicate entry

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.