Received: from shaked.cc.openu.ac.il (shaked.cc.openu.ac.il [147.233.145.65]) by hub.org (8.8.8/8.7.5) with ESMTP id HAA19047 for ; Tue, 14 Jul 1998 07:53:37 -0400 (EDT) Received: from [147.233.159.109] (herouth@mac-herouth.pc.openu.ac.il [147.233.159.109]) by shaked.cc.openu.ac.il (8.8.5/8.8.5) with ESMTP id OAA02676; Tue, 14 Jul 1998 14:53:15 +0300 (IDT) X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 14 Jul 1998 14:53:24 +0300 To: khj@cs.appstate.edu From: Herouth Maoz Subject: Re: [SQL] #define in SQL? Cc: pgsql-sql@postgreSQL.org At 14:42 +0300 on 14/7/98, Kenneth Jacker wrote: > I've looked in some SQL books and online, but can't seem to find what > I'm looking for ... > > The "copy" statement requires absolute paths to indicate file names. > Since these can be quite long, I would like a way -- similar to the C > pre-processor's "#define" -- to define a symbol in the beginning of my > SQL code that can be referenced later. > > In a C program I'd write: > > #define EXPORTFILE "/home/khj/tmp/pgsql.export" > > Can something similar be done in SQL? No. SQL is not a procedural language. It doesn't even have user-defined variables, much less constants. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma