pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed#define in SQL?
2+ messages / 2 participants
[nested] [flat]
* #define in SQL?
@ 1998-07-14 11:42 Kenneth Jacker <khj@cs.appstate.edu>
1998-07-14 11:53 ` Re: [SQL] #define in SQL? Herouth Maoz <herouth@oumail.openu.ac.il>
0 siblings, 1 reply; 2+ messages in thread
From: Kenneth Jacker @ 1998-07-14 11:42 UTC (permalink / raw)
To: pgsql-sql
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?
Thanks,
-Prof Kenneth H Jacker khj@cs.appstate.edu
-Computer Science Dept www.cs.appstate.edu/~khj
-Appalachian State Univ
-Boone, NC 28608 USA
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] #define in SQL?
1998-07-14 11:42 #define in SQL? Kenneth Jacker <khj@cs.appstate.edu>
@ 1998-07-14 11:53 ` Herouth Maoz <herouth@oumail.openu.ac.il>
0 siblings, 0 replies; 2+ messages in thread
From: Herouth Maoz @ 1998-07-14 11:53 UTC (permalink / raw)
To: khj@cs.appstate.edu; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-07-14 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-07-14 11:42 #define in SQL? Kenneth Jacker <khj@cs.appstate.edu>
1998-07-14 11:53 ` Herouth Maoz <herouth@oumail.openu.ac.il>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox