代码之家  ›  专栏  ›  技术社区  ›  Luv33preet

postgres表不存在,但实际上它确实存在[duplicate]

  •  0
  • Luv33preet  · 技术社区  · 6 年前

    this question ,

    我已从转储中还原了此数据库。

    这是我的问题,

    test_api=# \d+
                                          List of relations
     Schema |             Name              |   Type   |     Owner     |    Size    | Description
    --------+-------------------------------+----------+---------------+------------+-------------
     public | vehiclenumber                 | table    | luvpreetsingh | 8192 bytes |
     public | vehiclenumber_id_seq          | sequence | luvpreetsingh | 8192 bytes |
     public | launchPad_pair                | table    | luvpreetsingh | 8192 bytes |
    

    所有的表都在公共模式中(我只在这里发布了相关的表)。我可以从 vehiclenumber 桌子。

    test_api=# select * from iot_vehiclenumber;
     id |  vn  | rk  |  rt   | seed | vt
    ----+------+-----+-------+------+----
      1 | 4513 | NO  | RESET | 1234 | 01
      2 | 1234 | YES | RESET | 1234 | 01
    (2 rows)
    

    但我无法从 launchPad_pair

    test_api=# select * from launchPad_pair;
    ERROR:  relation "launchpad_pair" does not exist
    LINE 1: select * from launchPad_pair;
    
    test_api=# select * from public.launchPad_pair;
    ERROR:  relation "public.launchpad_pair" does not exist
    LINE 1: select * from public.launchPad_pair;
    

    我运行下面的查询,它会输出所有信息(再次确保模式是公共的),

    test_api=# SELECT * FROM information_schema.columns where table_name='launchPad_pair';
     table_catalog | table_schema |   table_name   | column_name | ordinal_position |                column_default                 | is_nullable | data_type | character_maximum_length | character_octet_length | numeric_precision | numeric_precision_radix | numeric_scale | datetime_precision | interval_type | interval_precision | character_set_catalog | character_set_schema | character_set_name | collation_catalog | collation_schema | collation_name | domain_catalog | domain_schema | domain_name | udt_catalog  | udt_schema | udt_name | scope_catalog | scope_schema | scope_name | maximum_cardinality | dtd_identifier | is_self_referencing | is_identity | identity_generation | identity_start | identity_increment | identity_maximum | identity_minimum | identity_cycle | is_generated | generation_expression | is_updatable
    ---------------+--------------+----------------+-------------+------------------+-----------------------------------------------+-------------+-----------+--------------------------+------------------------+-------------------+-------------------------+---------------+--------------------+---------------+--------------------+-----------------------+----------------------+--------------------+-------------------+------------------+----------------+----------------+---------------+-------------+--------------+------------+----------+---------------+--------------+------------+---------------------+----------------+---------------------+-------------+---------------------+----------------+--------------------+------------------+------------------+----------------+--------------+-----------------------+--------------
         test_api  | public       | launchPad_pair | id          |                1 | nextval('"launchPad_pairs_id_seq"'::regclass) | NO          | integer   |                          |                        |                32 |                       2 |             0 |                    |               |                    |                       |                      |                    |                   |                  |                |                |               |             | test_api | pg_catalog | int4     |               |              |            |                     | 1              | NO                  | NO          |                     |                |                    |                  |                  | NO             | NEVER        |                       | YES
         test_api  | public       | launchPad_pair | vehicle_id  |                2 |                                               | NO          | integer   |                          |                        |                32 |                       2 |             0 |                    |               |                    |                       |                      |                    |                   |                  |                |                |               |             | test_api | pg_catalog | int4     |               |              |            |                     | 2              | NO                  | NO          |                     |                |                    |                  |                  | NO             | NEVER        |                       | YES
         test_api  | public       | launchPad_pair | Box_id      |                3 |                                               | NO          | integer   |                          |                        |                32 |                       2 |             0 |                    |               |                    |                       |                      |                    |                   |                  |                |                |               |             | test_api | pg_catalog | int4     |               |              |            |                     | 3              | NO                  | NO          |                     |                |                    |                  |                  | NO             | NEVER        |                       | YES
    

    我检查了很多次以确保没有错别字。

    这里有什么问题?

    0 回复  |  直到 6 年前