Fix example code in computed relationships

Looks like a copy-paste error - the `films.id` column should be associated with the `premieres.film_id` column.
This commit is contained in:
mdr1384
2023-01-28 20:28:50 -05:00
committed by steve-chavez
parent e7413f3aea
commit a65d387a31
+1 -1
View File
@@ -1129,7 +1129,7 @@ Now let's define the opposite one-to-many relationship with another function.
.. code-block:: postgres
create function premieres(films) returns setof premieres as $$
select * from premieres where film_id = $1.director_id
select * from premieres where film_id = $1.id
$$ stable language sql;
Similarly, this function defines a relationship between the parameter ``films`` and the return type ``premieres``.