Relation Does not Exists

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zottty
    New Member
    • Feb 2007
    • 27

    #1

    Relation Does not Exists

    Dear Friends,

    I guess the problem I am prosting right now should be quite trivial, but nevertheless I'm experienced with SQL, this does not stand for PostgreSQL.

    I have a table with the stucture approx:
    Code:
     idorvos | integer                  | not null default nextval(('idorvos'::text)::regclass)
    nev     | character varying(255)   | not null
    And I want to run the query:
    Code:
    INSERT INTO "orvos" ("idorvos","nev") VALUES (DEFAULT,'TESZT')
    ...and got the response
    Code:
    ERROR:  relation "idorvos" does not exist
    I cannot change the query because it comes from PHPCake

    Please tell me what the problem might be.

    Thanks
    z
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Originally posted by zottty
    Dear Friends,

    I guess the problem I am prosting right now should be quite trivial, but nevertheless I'm experienced with SQL, this does not stand for PostgreSQL.

    I have a table with the stucture approx:
    Code:
     idorvos | integer                  | not null default nextval(('idorvos'::text)::regclass)
    nev     | character varying(255)   | not null
    And I want to run the query:
    Code:
    INSERT INTO "orvos" ("idorvos","nev") VALUES (DEFAULT,'TESZT')
    ...and got the response
    Code:
    ERROR:  relation "idorvos" does not exist
    I cannot change the query because it comes from PHPCake

    Please tell me what the problem might be.

    Thanks
    z
    INSERT INTO "orvos" (idorvos,nev) VALUES (DEFAULT,'TESZT ')

    Comment

    • zottty
      New Member
      • Feb 2007
      • 27

      #3
      Originally posted by rski
      INSERT INTO "orvos" (idorvos,nev) VALUES (DEFAULT,'TESZT ')
      Unfortunately that does not make a difference.

      Comment

      • rski
        Recognized Expert Contributor
        • Dec 2006
        • 700

        #4
        Originally posted by zottty
        Unfortunately that does not make a difference.
        Did you receive the same error?
        Do you have a sequence called idorvos?

        Comment

        • zottty
          New Member
          • Feb 2007
          • 27

          #5
          Originally posted by rski
          Did you receive the same error?
          Do you have a sequence called idorvos?
          Thank you a lot. That was the problem, the problem was with the sequence, which didn't exists...

          Best Luck
          z

          Comment

          Working...