Skip to content

Instantly share code, notes, and snippets.

Chad Nickell nickell

Block or report user

Report or block nickell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View postgres_camelize_functions.sql
create or replace function camelize(text)
returns text as $$
declare parts text[] = string_to_array($1, '_');
declare capitalized_parts text[] = (select array_agg(initcap(n)) from unnest(parts) as n);
return parts[1] || array_to_string(capitalized_parts[2:], '');
$$ language plpgsql;
create or replace function camelize_keys(json)
You can’t perform that action at this time.