Adam,

* Adam Brightwell (adam.brightw...@crunchydatasolutions.com) wrote:
> Pardon my ignorance, but can you help me understand the advantage of not
> having absolute path names in the COPY command?

If you're writing ETL processes and/or PL/PgSQL code which embeds the
COPY command and you migrate from one server to another, or the sysadmin
decides he wants to mount /data and /otherdata, it's nice to be able to
just update the directory alias rather than having to modify all the ETL
processes and PL/PgSQL code.

Basically, it provides an abstraction layer which would allow you to
avoid having to either create your own variable for the directory and
then track that somewhere in your own table (to get around having to
hard-code things into your ETL or PL/PgSQL code) or deal with updating
all that code when the filesystem structure changes for whatever reason.

        Thanks,

                Stephen

Attachment: signature.asc
Description: Digital signature

Reply via email to