quoted-identifier

Strange behaviour in Postgresql

社会主义新天地 提交于 2019-11-26 10:02:53
问题 I\'m new to Postgresql and I\'m trying to migrate my application from MySQL. I have a table with the following structure: Table \"public.tbl_point\" Column | Type | Modifiers | Storage | Description ------------------------+-----------------------+-----------+----------+------------- Tag_Id | integer | not null | plain | Tag_Name | character varying(30) | not null | extended | Quality | integer | not null | plain | Execute | integer | not null | plain | Output_Index | integer | not null |

sql statement error: “column .. does not exist”

怎甘沉沦 提交于 2019-11-26 05:56:46
问题 Im trying from postgres console this command: select sim.id as idsim, num.id as idnum from main_sim sim left join main_number num on (FK_Numbers_id=num.id); and I\'ve got this response: ERROR: column \"fk_numbers_id\" does not exist LINE 1: ...m from main_sim sim left join main_number num on (FK_Numbers... but if I simply check my table with: dbMobile=# \\d main_sim id | integer | not null default Iccid | character varying(19) | not null ... FK_Device_id | integer | FK_Numbers_id | integer |

PostgreSQL “Column does not exist” but it actually does

南笙酒味 提交于 2019-11-26 05:56:44
问题 I\'m writing a Java application to automatically build and run SQL queries. For many tables my code works fine but on a certain table it gets stuck by throwing the following exception: Exception in thread \"main\" org.postgresql.util.PSQLException: ERROR: column \"continent\" does not exist Hint: Perhaps you meant to reference the column \"countries.Continent\". Position: 8 The query that has been run is the following: SELECT Continent FROM network.countries WHERE Continent IS NOT NULL AND

Cannot simply use PostgreSQL table name (“relation does not exist”)

蓝咒 提交于 2019-11-26 01:26:26
问题 I\'m trying to run the following PHP script to do a simple database query: $db_host = \"localhost\"; $db_name = \"showfinder\"; $username = \"user\"; $password = \"password\"; $dbconn = pg_connect(\"host=$db_host dbname=$db_name user=$username password=$password\") or die(\'Could not connect: \' . pg_last_error()); $query = \'SELECT * FROM sf_bands LIMIT 10\'; $result = pg_query($query) or die(\'Query failed: \' . pg_last_error()); This produces the following error: Query failed: ERROR: