obarisk opened a new issue, #37654:
URL: https://github.com/apache/airflow/issues/37654
### Apache Airflow Provider(s)
google
### Versions of Apache Airflow Providers
<= 10.15.0
### Apache Airflow version
2.8.1
### Operating System
Debian GNU/Linux 12
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### What happened
when total characters of dag_id and task_id greater than 24. (64 - 36 - 4)
PostgresToGCSOperator with argument `use_server_side_cursor = True` run into
psycopg2 error
> psycopg2.errors.SyntaxError: unterminated quoted identifier
### What you think should happen instead
possible expectations
- Add a configuration options for the limitation of postgres identifier
length. (default = 64)
- Detect postgres identifier length before execution. Error out as earier as
possible
- Shorten the `_unique_name` generation for the cursor, currently
```
def _unique_name(self):
return f"{self.dag_id}__{self.task_id}__{uuid.uuid4()}" if
self.use_server_side_cursor else None
```
### How to reproduce
```python
from airflow.providers.google.cloud.transfers.gcs_to_bigquery import
GCSToBigQueryOperator
task = PostgresToGCSOperator(
task_id="t" * 25,
use_server_side_cursor=True,
doc_md=f"""postgres identifier overflow""",
)
```
### Anything else
_No response_
### Are you willing to submit PR?
- [X] 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/airflow/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]