avamingli opened a new issue, #740:
URL: https://github.com/apache/cloudberry/issues/740
### Apache Cloudberry version
main
### What happened
manage pg_task in code block got ERROR.
### What you think should happen instead
Besides the error in copyfuncs.c, there may be other bugs when serialization
or desrialization.
### How to reproduce
```sql
gpadmin=# create task task1 schedule '5 * * * * ' as 'select * from t1';
CREATE TASK
gpadmin=# select * from pg_task;
jobid | schedule | command | nodename | nodeport | database |
username | active | jobname
-------+------------+------------------+-----------+----------+----------+----------+--------+---------
17022 | 5 * * * * | select * from t1 | 127.0.0.1 | 9000 | gpadmin |
gpadmin | t | task1
(1 row)
gpadmin=# DO $$
DECLARE
jn text;
BEGIN
SELECT jobname from pg_task limit 1 into jn;
EXECUTE FORMAT('DROP TASK %I', jn);
END $$;
ERROR: unrecognized node type: 742 (copyfuncs.c:7358)
CONTEXT: SQL statement "DROP TASK task1"
PL/pgSQL function inline_code_block line 6 at EXECUTE
```
### Operating System
Ubuntu
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]