#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    ERROR: cross-database references are not implemented


    Hello friends,
    I am trying to insert a record to product table in postgreSql using restSql and I am getting the following error:
    ERROR: cross-database references are not implemented: "jeisdb.public.product"
    Position: 13 :: INSERT INTO jeisdb.public.product (productid,name) VALUES (10,'Copper # 1A Bare_2')

    Any idea?

    Thanks for your help and your support
    Have a great day

    kaval
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,785
    Rep Power
    348
    You need to remove the database from the table name:

    Code:
    INSERT INTO public.product (productid,name) VALUES (10,'Copper # 1A Bare_2');
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
    http://forums.devshed.com/misc.php?do=bbcode#code

    Tips on how to ask better questions:
    http://tkyte.blogspot.de/2005/06/how-to-ask-questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    Thanks shammat for your help,
    The problem that i am calling a restSql call like the followin :
    http://localhost:8080/restsql/res/product
    And restSql generate the query, so how can I can remove the database name from the query

    Thanks again

    Kaval
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,785
    Rep Power
    348
    Originally Posted by kaval
    Thanks shammat for your help,
    The problem that i am calling a restSql call like the followin :
    http://localhost:8080/restsql/res/product
    And restSql generate the query, so how can I can remove the database name from the query
    You will need to ask that in a forum that deals with that restSql product. It's defintely not a Postgres problem if your application generates invalid SQL.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
    http://forums.devshed.com/misc.php?do=bbcode#code

    Tips on how to ask better questions:
    http://tkyte.blogspot.de/2005/06/how-to-ask-questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    Thanks for your help Bro

IMN logo majestic logo threadwatch logo seochat tools logo