Oracle Database 12c EE PostgreSQL, PostgreSQL IEM- Ultimate |
-- current search_path = my_schema
create or replace function my_func(my_arg text) returns void as $$
declare v_id bigint;
begin
perform another_func(my_arg); -- same as perform my_schema.another_func(my_arg);
select id into v_id from kernel.users -- table name is qualified with kernel schema name where login = my_arg; -- the rest is skipped...
end $$ language plpgsql set search_path to my_schema;
create or replace function my_secure_func() returns void as $$
begin -- call here any functions available to the superuser
end $$ language plpgsql security definer; -- default is security invoker
create_permanent_temp_table(table_name [, schema_name]);
drop_permanent_temp_table(table_name [, schema_name]);
create temporary table if not exists another_temp_table ( first_name varchar, last_name varchar, date timestamp(0) with time zone, primary key(first_name, last_name) ) on commit drop;
-- create my_schema.another_temp_table select pack_temp.create_permanent_temp_table('another_temp_table', 'my_schema');
-- or create another_temp_table in the current schema -- select create_permanent_temp_table('another_temp_table');
-- don't forget to commit: PostgreSQL DDL is transactional commit;
//
var query = from a in DataContext.GetTable()
where a.ID = Constants.TestAgentID select a;
//
var testAgentId = Constants.TestAgentID;
var query = from a in DataContext.GetTable()
where a.ID = testAgentId select a;
//
foreach (var langId in DataContext.GetTable().Select(x => x.ID))
{
using (LanguageService.UseLanguage(langId))
{
// do something language-specific
}
}
//
foreach (var langId in DataContext.GetTable().Select(x => x.ID).ToIDList())
{
using (LanguageService.UseLanguage(langId))
{
// do something language-specific
}
}
//
var dictionary = DataContext.GetTable().Where(d => dates.Contains(d.DT)) .GroupBy(g => g.DT, e => e.StatusID) .ToDictionary(k => k.Key, e => e.ToIDList());
//
var dictionary = DataContext.GetTable() .Where(d => dates.Contains(d.DT)) .GroupBy(g => g.DT, e => e.StatusID) .ToDictionary(p => p.Key);
var dict = dictionary.ToDictionary(p => p.Key, p => p.Value.ToIDList());