sqlparser/functions.cpp
// USER in Oracle, SQL Server, DB2, Sybase ASE
USER in Oracle, SQL Server, DB2, Sybase ASE
USER in Oracle SQL Server DB2 Sybase ASE
bool SqlParser::ParseFunctionUser(Token *name)
{
	if(name == NULL)
		return false;
	STATS_DECL
	if(_target == SQL_SQL_SERVER)
		Token::Change(name, "SYSTEM_USER", L"SYSTEM_USER", 11);
	else
	if(Target(SQL_MARIADB, SQL_MYSQL))
		AppendNoFormat(name, "()", L"()", 2);
	else
	if(Target(SQL_POSTGRESQL, SQL_GREENPLUM) == true)
		Token::Change(name, "CURRENT_USER", L"CURRENT_USER", 12);
	name->nullable = false;
	FUNC_STATS(name);
	return true;
}
bool SqlParser :: ParseFunctionUser ( Token * name ) { if ( name == NULL ) return false ; STATS_DECL if ( _target == SQL_SQL_SERVER ) Token :: Change ( name , " " , L" " , 11 ) ; else if ( Target ( SQL_MARIADB , SQL_MYSQL ) ) AppendNoFormat ( name , " " , L" " , 2 ) ; else if ( Target ( SQL_POSTGRESQL , SQL_GREENPLUM ) == true ) Token :: Change ( name , " " , L" " , 12 ) ; name -> nullable = false ; FUNC_STATS ( name ) ; return true ; }
USER in Oracle, SQL Server, DB2, Sybase ASE
USER in Oracle SQL Server DB2 Sybase ASE
// Convert to SYSTEM_USER in SQL Server (CURRENT_USER is also supported but returns 'dbo' i.e.) // Add parentheses in MySQL // Convert to CURRENT_USER in PostgreSQL, Greenplum