Subject | Re: Check if an alias is defined |
---|---|
Author | Milan Babuskov |
Post date | 2007-08-22T13:16:17Z |
Stefan Heymann wrote:
privileges to read the aliases config file, this UDF could simply open
it and fetch the contents as a string or it could provide a facility
to read the file line-by-line by supplying the line number as parameter:
execute block
returns (line varchar(3000))
as
declare variable lineno integer;
begin
lineno = 1;
while (lineno = 1 and line != '') do
begin
select get_aliases(:lineno) from rdb$database into :line;
lineno = lineno + 1;
suspend;
end
end
> I agree that aliasing is primarily for security. However, it's alsoI guess a simple UDF should do the job. Since firebird process has
> about simplification. So for setups that do not try to be Fort Knox,
> it could IMHO be allowed to query the aliases or even manage the
> aliases from a remote machine.
privileges to read the aliases config file, this UDF could simply open
it and fetch the contents as a string or it could provide a facility
to read the file line-by-line by supplying the line number as parameter:
execute block
returns (line varchar(3000))
as
declare variable lineno integer;
begin
lineno = 1;
while (lineno = 1 and line != '') do
begin
select get_aliases(:lineno) from rdb$database into :line;
lineno = lineno + 1;
suspend;
end
end