Define command - Mailing list pgsql-hackers

From Dr. Michael Meskes
Subject Define command
Date
Msg-id 19980814131738.A2451@online-club.de
Whole thread Raw
List pgsql-hackers
I found some time today and added the exec sql define command to ecpg.
However, since I do not have the specs with me I am not completely sure the
syntax and semantics is correct.

I believe the syntax wax: exec sql define AMOUNT is 5;

As for the semantics I think this should mean to replace AMOUNT by the value
5 (of course) in the complete file. That is also replace inside the C part.
I'm not sure about that, but otherwise it would be impossible to parse the
variable declarations.

Also it cannot do variable expansions, just simple string for string
replacements. Since ORACLE doesn't seem to support it at all, could anyone
wit a system that does support this feature check whether this works:

exec sql define S(X) is X=X+1;

I believe Informix does support defines.

Michael
--
Dr. Michael Meskes        meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!    Use Debian GNU/Linux!

pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: non instead rule system
Next
From: "Dr. Michael Meskes"
Date:
Subject: ecpg problem