0

I want to create a view like

CREATE VIEW monitors_info AS
      SELECT monitors_id, nom
       FROM monitors;

But, I got this message

 ERROR: No schema has been selected to create in. (using psql)

I don't know what I miss, please help me.

1
  • 1
    I guess your search_path does not point to any existing schema. Also, please use the formatting options. Oct 6, 2016 at 12:43

1 Answer 1

1

The answer is in your question;

ERROR: No schema has been selected to create in. (using psql)

You need to specify the schema. Something like:

CREATE VIEW MYSCHEMA.monitors_info AS SELECT MYSCHEMA.monitors_id, MYSCHEMA.nom FROM MYSCHEMA.monitors; 

Not the answer you're looking for? Browse other questions tagged or ask your own question.