Hmm, what is the idea of a SETOF VOID type? Can you show an example?

It's quite possible that this generates a signature that is currently not
captured by jOOQ-meta's queries against the dictionary views. Currently,
we're running the following query in
org.jooq.util.postgres.PostgresDatabase:

                .select()
                .from(
                     select(
                        TABLES.TABLE_SCHEMA,
                        TABLES.TABLE_NAME,
                        TABLES.TABLE_NAME.as("specific_name"),
                        inline(false).as("table_valued_function"),
                        PG_DESCRIPTION.DESCRIPTION)
                    .from(TABLES)
                    .join(PG_NAMESPACE)
                        .on(TABLES.TABLE_SCHEMA.eq(PG_NAMESPACE.NSPNAME))
                    .join(PG_CLASS)
                        .on(PG_CLASS.RELNAME.eq(TABLES.TABLE_NAME))
                        .and(PG_CLASS.RELNAMESPACE.eq(oid(PG_NAMESPACE)))
                    .leftOuterJoin(PG_DESCRIPTION)
                        .on(PG_DESCRIPTION.OBJOID.eq(oid(PG_CLASS)))
                        .and(PG_DESCRIPTION.OBJSUBID.eq(0))
                    .where(TABLES.TABLE_SCHEMA.in(getInputSchemata()))

                // [#3375] [#3376] Include table-valued functions in the
set of tables
                .unionAll(
                    select(
                        ROUTINES.ROUTINE_SCHEMA,
                        ROUTINES.ROUTINE_NAME,
                        ROUTINES.SPECIFIC_NAME,
                        inline(true).as("table_valued_function"),
                        inline(""))
                    .from(ROUTINES)

.join(PG_NAMESPACE).on(ROUTINES.SPECIFIC_SCHEMA.eq(PG_NAMESPACE.NSPNAME))

.join(PG_PROC).on(PG_PROC.PRONAMESPACE.eq(oid(PG_NAMESPACE)))

.and(PG_PROC.PRONAME.concat("_").concat(oid(PG_PROC)).eq(ROUTINES.SPECIFIC_NAME))
                    .where(ROUTINES.ROUTINE_SCHEMA.in(getInputSchemata()))
                    .and(PG_PROC.PRORETSET))
                .asTable("tables"))
                .orderBy(1, 2)
                .fetch()) {

Perhaps, this specific case doesn't set the PG_PROC.PRORETSET flag...?

Best,
Lukas

2015-05-04 15:30 GMT+02:00 Ben Hood <[email protected]>:

> Hi Lukas,
>
> Using 3.6.1 I'm having an issue generating a routine object for a
> RETURNS SETOF VOID function:
>
> CREATE OR REPLACE FUNCTION f (arg BIGINT) RETURNS SETOF VOID AS $$
>
> It looks like the code generator doesn't seem to find the relevant
> object in the schema metadata.
>
> However, if I change the header to return VOID instead of SETOF VOID,
> the routine object will get generated.
>
> Looking back over some tickets it seems that SETOF has been support since
> 3.6.0:
>
> https://github.com/jOOQ/jOOQ/issues/3376
>
> Possibly I'm misunderstanding how the process works - is this style of
> return type supported by JOOQ?
>
> Cheers,
>
> Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to