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
2022-09-15 18:33:14 -05:00
committed by Steve Chavez
parent 9128c8602a
commit 022101ae3c
+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``.