Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

severity: Error, code: "42704", message: "type \"dict_state\" does not exist", #3214

Open
abnereel opened this issue Apr 22, 2024 · 0 comments
Labels

Comments

@abnereel
Copy link

Bug Description

let query = format!("SELECT * FROM {} WHERE is_deleted = FALSE AND state = $1", Self::TABLE);
let query = sqlx::query_as(&query).bind(DictState::Usable);
let result = mm.dbx().fetch_all(query).await?;

When executing the above SQL, when there is data in the table, the query will not report an error. When there is no data in the table, the following errors will be initially selected:
Sqlx(Database(PgDatabaseError { severity: Error, code: "42704", message: "type "dict_state" does not exist", detail: None, hint: None, position: None, where: None, schema: None, table: None, column: None, data_type: None, constraint: None, file: Some("parse_type.c"), line: Some(802), routine: Some("parseTypeString") }))

Info

  • SQLx version: 0.7.4
  • SQLx features enabled: macros,runtime-tokio-native-tls,runtime-tokio,postgres,uuid,chrono,
  • Database server and version: Postgres
  • Operating system: Mac
  • rustc --version: 1.77.2
@abnereel abnereel added the bug label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant