Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
begin;
select cinefiles_denorm.doc_detail_summary('12', 'document', 'doctitle', 'authors', 'source', 'doctype', 'lang', 'docsubj', 'docnamesubj', 'docfilmsubj', 'docurl');
fetch all in "document";
fetch all in "doctitle";
fetch all in "authors";
fetch all in "source";
fetch all in "doctype";
fetch all in "lang";
fetch all in "docsubj";
fetch all in "docnamesubj";
fetch all in "docfilmsubj";
fetch all in "docurl";
commit;

Note

Some name_id and subj_id fields returned are static '2' because those fields are not used.  See example below.

Returns:

Code Block
content  | doc_id |    date     | pages | pg_info | cast_cr | tech_cr | bx_info
 | filmog | dist_co | prod_co | cost | illust | note
----------+--------+-------------+-------+---------+---------+---------+--------
-+--------+---------+---------+------+--------+------
 Document |     12 | 1989 Aug 06 |     2 | p. H-15 |       0 |       0 |       0
 |      0 |       0 |       0 |    1 |      0 |
(1 row)

    content     |                title
----------------+-------------------------------------
 Document Title | The abyss: a foray into deep waters
(1 row)

     content      | name_id |     author
------------------+---------+----------------
 Document Authors |       2 | Aljean Harmetz
(1 row)

     content     |     src_id      |     source     | srcurl
-----------------+-----------------+----------------+--------
 Document Source | organization482 | New York Times |
(1 row)

    content    |  type
---------------+--------
 Document Type | review
(1 row)

      content       |  lang
--------------------+---------
 Document Languages | English
(1 row)

      content      | subj_id |           subj
-------------------+---------+---------------------------
 Document Subjects |       2 | Underwater cinematography
(1 row)

        content         | name_id |                    namesubj

------------------------+---------+---------------------------------------------
----
 Document Name Subjects |       2 | James Cameron, Kapuskasing, Ontario, Canada
 Document Name Subjects |       2 | Ed Harris, Englewood, New Jersey, United Sta
tes
(2 rows)

        content         | film_id  |            filmsubj
------------------------+----------+--------------------------------
 Document Film Subjects | pfafilm2 | The abyss, James Cameron, 1989
(1 row)

   content    | docurl
--------------+--------
 Document URL |
(1 row)

...

Returns multiple results sets for film citation.  Called by FilmDetail.java

Note

NOTE: Some queries used in this function need to do select distinct in order to handle films with multiple release years.

Some name_id and subj_id fields returned are static '2' because those fields are not used.  See example below.

Execution (for film_id='pfafilm3):

Code Block
begin;
select cinefiles_denorm.film_detail_summary('pfafilm3','title', 'director', 'country', 'filmyear', 'lang', 'prodco', 'genre', 'subject', 'reldocs');
fetch all in "title";
fetch all in "director";
fetch all in "country";
fetch all in "filmyear";
fetch all in "lang";
fetch all in "prodco";
fetch all in "genre";
fetch all in "subject";
fetch all in "reldocs";
commit;

Returns:

Code Block
...content |  filmid  |            title
---------+----------+------------------------------
 Title   | pfafilm3 | L'Oeuvre au noir (The Abyss)
(1 row)

  content  | id |   director
-----------+----+---------------
 Directors |  2 | André Delvaux
(1 row)

  content  | country
-----------+---------
 Countries | Belgium
 Countries | France
(2 rows)

 content | year
---------+------
 Years   | 1988
(1 row)

  content  |  lang
-----------+--------
 Languages | French
(1 row)

 content | id | prodco
---------+----+--------
(0 rows)

 content |   genre
---------+------------
 Genres  | Adaptation
 Genres  | Historical
(2 rows)

 content  | id |                   subject
----------+----+---------------------------------------------
 Subjects |  2 | Alchemists -- Drama
 Subjects |  2 | Belgium -- History -- 16th century -- Drama
(2 rows)

   content    | id |                        title                         |
type     | pages | pg_info |             source             | name_id |
      author               |   pubdate   | juliandate | code | docurl
--------------+----+------------------------------------------------------+-----
---------+-------+---------+--------------------------------+---------+---------
---------------------------+-------------+------------+------+--------
 Related Docs | 18 | Andre Delvaux: une oeuvre--un film: L'oeuvre au noir | pres
s kit    |    19 |         | Editions Méridiens Klincksieck |       2 | André De
lvaux|Marguerite Yourcenar | 1988        |            |    4 |
 Related Docs | 19 | L'oeuvre au noir                                     | prog
ram note |     1 | p. 47   | Cannes Film Festival           |       2 | André De
lvaux                      | 1988 May    |            |    4 |
 Related Docs | 20 | L'oeuvre au noir                                     | revi
ew       |     1 |         | Variety                        |       2 | Lenny Bo
rger                       | 1988 May 18 |            |    4 |
 Related Docs | 21 | L'oeuvre au noir (the abyss)                         | revi
ew       |     1 |         | Hollywood Reporter             |       2 |
                           | 1988 May 16 |            |    0 |
 Related Docs | 22 | L'oeuvre au noir                                     | pres
s kit    |    58 |         | UGC Images France SA.          |       2 |
                           | 1988        |            |    4 |
(5 rows)