cast_struct.sql 380 B

12345678
  1. /* postgres can not */
  2. /* syntax version 1 */
  3. $struct = <|du:3.14, fl:-1.f, i:0, s:"str"u, u:123u|>;
  4. select
  5. CAST($struct AS Struct<>) as empty,
  6. CAST($struct AS Struct<du:Uint32?, fl:Uint32?, s:Uint16?, u:Int32?>) as partial,
  7. CAST($struct AS Struct<x:Uint8?, y:Uint16?, z:Int8?>) as others,
  8. CAST($struct AS Struct<du:Uint32, fl:Uint32, s:Uint16, u:Int32>) as fail;