# GSoC 2026: Interest in adding support for generate\_series in postgres

**URL:** <https://forum.djangoproject.com/t/gsoc-2026-interest-in-adding-support-for-generate-series-in-postgres/44362>\
**Category:** Google Season of Code\
**Created:** [March 3, 2026, 4:43am UTC](https://forum.djangoproject.com/t/gsoc-2026-interest-in-adding-support-for-generate-series-in-postgres/44362 "2026-03-03T04:43:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![charettes](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/charettes/32/27_2.png) [@charettes](https://forum.djangoproject.com/u/charettes)\
**Post date:** [March 14, 2026, 6:36pm UTC](https://forum.djangoproject.com/t/gsoc-2026-interest-in-adding-support-for-generate-series-in-postgres/44362/2 "2026-03-14T18:36:25Z")

</div>

Hello William, excited to hear about your interest in GSoC for this topic.

> [@williamcancodee](#):
>
> Should the 350 hours be focused on getting the generate\_series function working correctly, or should the work heavily focus on creating a generic relation expression so that we can support other SRFs in the future?

In my opinion the main priority here would be to add generic support support for `CompositeField` as that would pave the door, amongst other things, to have expression define that they return tuples of fields.

Today there are few cases where we _fake_ the `output_field` of expressions or have to resort to manual subqueries wrapping (e.g. during aggregation) which we could do away with if we had `CompositeField`.

Members of `sql.Query.alias_map` which are either `BaseTable` or `Join` could define their own `output_field` which would make it easier to _compose_ complex joins scenarios, CTEs, and [implement methods a such as `as_subquery`](https://code.djangoproject.com/ticket/24462) because the generation of the SQL associated with the `FROM` clause members would be delegated to the expressions instead of hardcoded in the compiler.

This would allow the lookup resolving logic of `Query` be changed from starting from `self.model` to `self.base_table.output_field` and pave the door to moving tons of hardcoded `Query` logic to `Expression.resolve_expression`.

Official set returning functions, which behave closely to subqueries, could then be built on top of that by having annotations of them result in `LATERAL JOIN` pushdown if they are not singleton.

---

_[View the full topic](https://forum.djangoproject.com/t/gsoc-2026-interest-in-adding-support-for-generate-series-in-postgres/44362)._
