You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, ive been trying to use enums with WITH queries but i keep getting the error:
Error: error occurred while decoding column 1: custom types in records are not fully supported yet: failed to retrieve type info for field 1 with type oid
17632
Caused by:
custom types in records are not fully supported yet: failed to retrieve type info for field 1 with type oid 17632
the code that im using:
CREATETYPEstatusAS ENUM ('New', 'Deleted');
CREATETABLEIF NOT EXISTS js_page (
id SERIALPRIMARY KEY,
status STATUS NOT NULL DEFAULT 'New'
);
#[derive(Debug,Type)]pubenumStatus{New,Deleted,}#[derive(Debug,Type)]pubstructS{id:i32,status:Status,}let endpoints = sqlx::query!(r#"WITH cte AS ( SELECT id, status FROM js_page ) SELECT e.id, array_agg(( cte.id, cte.status )) "pages: Vec<S>" FROM endpoint AS e, cte GROUP BY e.id"#,).fetch_all(&pool).await?;
the program compiles and the error only happens at runtime, any idea how can i accomplish that?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, ive been trying to use enums with
WITH
queries but i keep getting the error:the code that im using:
the program compiles and the error only happens at runtime, any idea how can i accomplish that?
Beta Was this translation helpful? Give feedback.
All reactions