NAME
dbsever - remove a table from a joined view
SYNOPSIS
Dbptr dbsever ( Dbptr db, char *tablename, char *name );
DESCRIPTION
This performs something like the inverse of the join
operation, removing a table from a joined view.
Although the raw operation could create duplicate rows in
the result, dbsever does not allow duplicate rows (rows
with the same combination of rows from base tables) to be created
in the output.
A dbjoin
followed by a dbsever is something like the complement to the
dbnojoin(3) operation: it finds the rows in the first table which
do join with the second table.
EXAMPLE
It's occasionally useful to join a table to a view temporarily
for a subset operation, and to then remove it from the view
in order to join the original table(s) in some more general fashion.
For instance, to find all the origin rows which correspond to
events for which the preferred origin is within 5 degrees of
a specified location, consider using the following sequence:
-
1)
Join event with origin, specifying prefor==orid.
-
2)
Subset the view to only origins within 5 degrees of the specified location.
-
3)
Sever the origin table from the subset view.
-
4)
Join this (subset) event table with origin on the evid key.
RETURN VALUES
returns a valid db pointer if successful, or
a
dbinvalid(3) pointer when some error occurs.
LIBRARY
$(DBLIBS)
DIAGNOSTICS
-
Table not found in view
The specified table was not present in the view.
SEE ALSO
dbjoin(3)
AUTHOR
Daniel Quinlan