I'm trying to create a temporary table and use it with JOOQ.

Here's the query I use directly on DB and it works.

CREATE TEMPORARY TABLE temp_table_1
ON COMMIT DROP
AS
SELECT a1 FROM table1;

select * from func_uses_temp_table();


I tried to use    

createTemporaryTable("t1").as(query).onCommitDrop().execute();

and then

fetch("select * from t1"); 

but it fails with message "jOOQ; bad SQL grammar [select * from t1]; nested 
exception is org.postgresql.util.PSQLException: ERROR: relation "t1" does 
not exist Position: 15"


So what would be the correct way to use temporary tables in queries?



-- 
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