Ana Hobden
Ana Hobden
If we had https://github.com/rust-lang/rust/issues/95174 we could do like this and then capture it with the SQL generator macros: ```rust #![feature(adt_const_params)] mod pgx { pub trait UserDefined; } struct SomeUserType; impl...
From a "Correct Rust" level, this is what we ~should~ be doing, lacking `adt_const_params`: ```rust const IMPORTANT_SQL_TYPE: &'static str = "Bean"; const UNIMPORTANT_SQL_TYPE: &'static str = "Beet"; #[pgx::pg_extern(return_sql_type = UNIMPORTANT_SQL_TYPE)]...
I managed to reproduce this on our `aggregate` example using a fresh CentOS 7 VM. It's... interesting. It seems to be originating from here, though I haven't hazarded why: https://github.com/tcdi/pgx/blob/1a89778046547c52c714fe6885069eab5638f965/pgx-utils/src/sql_entity_graph/pgx_sql.rs#L221-L222...
@sumerman could you give that fix a shot?
Please upgrade your Rust version. Looks like we used `format!("{val}")` which is I believe Rust 1.58.
I hate myself a little bit as I accidently pushed our MSRV bump to `develop`, but thanks for catching it: https://github.com/tcdi/pgx/commit/0da3b3f5f53751c4ce5f4aeaac3a24ef34036958
(Noting this is still open as we haven't released #573...)
Hey @W1M0R , I think this is a good feature suggestion!
This PR is causing some strangeness on `pgx-tests`'s sql generation. I attempted to add the following to `pgx-tests/src/tests/extension_sql_tests.rs`: ```rust extension_sql_file!( "../../sql/example.sql", name = "example_file", ); ``` Where `../../sql/example.sql` contained `CREATE...
So this appears to be because of the `format!()` macro usage, as I can use `concat!()` just fine. This is something I'd prefer to resolve before merge...