gpt-4.1-mini-2025-04-14· OpenAI
LMArena Human Preference 140K
In postgres, if I define a function as sql (not PL/pgSQL), will the planner inline…
- User
In postgres, if I define a function as sql (not PL/pgSQL), will the planner inline it/see through it?
- Assistant
Yes, in PostgreSQL, if you define a function using the (i.e., a SQL-language function), the planner the function in many cases. This means the planner can "see through" the function body and incorporate its SQL directly into the calling query, potentially enabling better optimization.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.