Search Postgresql Archives

generating a parent/child relationship in a trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Suppose I'm adding row to a table, and one of the columns is
a pathname.

I would like to generate in a separate table parent/child
relationships based on the path.

For example, adding "/foo/bar/baz" and "/foo/bar/bot" would
generate the following relationships

parent      child
------      -----
/foo        /foo/bar
/foo/bar    /foo/bar/baz
/foo/bar    /foo/bar/bot

Is this a reasonable thing to do in a trigger?  Does anybody
have a pl/sql snippet to do this?

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux