Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I believe that PostgreSQL and Oracle both support this kind of thing. But naturally, they support it in incompatible ways.
    • Can you point to me where in the Postgres docs this is described? I've found references to it on the Web but I'm having trouble finding it in the documentation.

      • Likewise, I've seen it described but not looked for it in the docs. Nor have I used it, and I don't have a Postgres install handy to fiddle with.
      • Is this the section you're looking for: Arrays [postgresql.org]?
        • I suspect that's what was meant. Thanks! Unfortunately, it shows that Postgres really can't be used an MV database unless you push a lot of stuff into the application layer. Thus, one could think of it as the MySQL of MV databases (in other words, a fancy toy).

  • While it still requires that you type the query correctly once, views are portable across relational databases (finally even MySQL as of 5.0)

    CREATE VIEW recipe_ingredient_list AS
      SELECT r.id, i.name
      FROM   ingredients i, recipe_ingredient ri, recipes r
      WHERE  r.id = ri.recipe_id
        AND  i.id = ri.ingredient_id

    so that you could use this query:

    SELECT name
    FROM   recipe_ingredient_list
    WHERE  id = ?

    And if you use PostgreSQL as the backend (so

    • Aside from the "write rules in Perl" part, we actually use "updateable" views with Postgres (and SQLite) all the time where I work. It's very handy.

  • --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers