On Thu, May 11, 2006 at 07:02:23AM -0500, John Goerzen wrote:
> True enough.  But then, I need to do things like manually construct the
> psql command line with all the proper arguments, decide if I need to su
> to a particular user first, etc.  I think I need to do this as the
> PostgreSQL superuser (though I haven't tried that yet).

good point.  

of the two methods, i think i'm more inclined to go for the latter
option (template+substitution) as it seems a  bit conceptually simpler
and  thus less prone to bugs/misuse.  i'll mull over it a bit and let
you know if my PoV changes, but otherwise i assume something like
setting:

        dbc_sqlfiles_are_templates="yes"

in the postinst before calling dbc_go would be the general
implementation.  then in the code i could basically insert
something like "| sed -e'...'" into what was previously
something like "cat sqlfile | dbc_internal_command".  

in fact, i just realized that i already have a program that can do the
substitution for me (dbc-generate-include using template innput and
stdout output), so i'm now even more inclined to go this route.


        sean

Attachment: signature.asc
Description: Digital signature

Reply via email to