{"id":92114,"date":"2020-08-23T19:41:56","date_gmt":"2020-08-23T17:41:56","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql"},"modified":"2020-08-23T19:41:56","modified_gmt":"2020-08-23T17:41:56","slug":"realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql","status":"publish","type":"post","link":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql","title":{"rendered":"Implementa\u00e7\u00e3o de um modelo de acesso baseado em fun\u00e7\u00f5es utilizando Row Level Security no PostgreSQL","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Desenvolvimento do tema <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/515896\/\">Estudo sobre a implementa\u00e7\u00e3o de Row Level Security no PostgreSQL<\/a><\/noindex> e <b>para uma resposta detalhada<\/b> para <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/515628\/#comment_21973176\">coment\u00e1rio.<\/a><\/noindex><\/p>\n<p>A estrat\u00e9gia utilizada implica a aplica\u00e7\u00e3o do conceito de 'L\u00f3gica de Neg\u00f3cios no BD', que foi descrito um pouco mais detalhadamente aqui \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/515628\/\">Estudo sobre a implementa\u00e7\u00e3o de l\u00f3gica de neg\u00f3cios em fun\u00e7\u00f5es armazenadas PostgreSQL<\/a><\/noindex><\/p>\n<p>A parte te\u00f3rica est\u00e1 bem explicada na documenta\u00e7\u00e3o <noindex><a rel=\"nofollow\" href=\"https:\/\/postgrespro.ru\/\">Postgres Pro<\/a><\/noindex> \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/11\/ddl-rowsecurity\">Pol\u00edticas de prote\u00e7\u00e3o de linhas<\/a><\/noindex>. Abaixo, discutiremos a implementa\u00e7\u00e3o pr\u00e1tica <b>de uma tarefa de neg\u00f3cio espec\u00edfica \u2014 modelo de acesso baseado em fun\u00e7\u00f5es.<\/b><\/p>\n<p><img decoding=\"async\" alt=\"Implementa\u00e7\u00e3o de um modelo de acesso baseado em fun\u00e7\u00f5es utilizando Row Level Security no PostgreSQL\" src=\"\/wp-content\/uploads\/2020\/08\/df69397b8638421732a67e457c99857c.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<blockquote><p>N\u00e3o h\u00e1 nada de novo no artigo, nenhuma mensagem oculta ou conhecimento secreto. \u00c9 apenas um esbo\u00e7o sobre a implementa\u00e7\u00e3o pr\u00e1tica de uma ideia te\u00f3rica. Se algu\u00e9m estiver interessado \u2014 leia. Se n\u00e3o estiver interessado \u2014 n\u00e3o perca seu tempo.<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Formula\u00e7\u00e3o do problema<\/h2>\n<p>\n\u00c9 necess\u00e1rio restringir o acesso para visualiza\u00e7\u00e3o\/inser\u00e7\u00e3o\/modifica\u00e7\u00e3o\/remo\u00e7\u00e3o de documentos de acordo com o papel do usu\u00e1rio do aplicativo. Por papel, entendemos uma entrada na tabela <b>roles<\/b> relacionada com uma rela\u00e7\u00e3o muitos-para-muitos com a tabela <b>tinham endere\u00e7os de e-mail em dom\u00ednios<\/b>. Os detalhes da implementa\u00e7\u00e3o das tabelas, devido \u00e0 sua trivialidade, foram omitidos. Tamb\u00e9m foram omitidos detalhes espec\u00edficos da implementa\u00e7\u00e3o relacionados ao dom\u00ednio.<\/p>\n<h2>Implementa\u00e7\u00e3o<\/h2>\n<p><\/p>\n<h4>Criamos pap\u00e9is, esquemas, tabela<\/h4>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Cria\u00e7\u00e3o de objetos no BD<\/b><\/p>\n<pre><code class=\"pgsql\">CREATE ROLE store;\nCREATE SCHEMA store AUTHORIZATION store;\nCREATE TABLE store.docs\n(\n  id integer ,         --id do documento\n  man_id integer , --id do gerente do documento\n  stat_id integer ,  --id do status do documento\n  ...\n  is_del BOOLEAN DEFAULT FALSE \n);\nALTER TABLE store.docs ADD CONSTRAINT doc_pk PRIMARY KEY (id);\nALTER TABLE store.docs OWNER TO store ;\n<\/code><\/pre>\n<p><\/p>\n<h4>Criamos fun\u00e7\u00f5es para implementar RLS<\/h4>\n<p>\nVerifica\u00e7\u00e3o da possibilidade de executar SELECT na linha<\/p>\n<p>                        <b class=\"spoiler_title\">check_select<\/b><\/p>\n<pre><code class=\"pgsql\">CRIE OU REPLACE FUNCTION store.check_select ( current_id store.docs.id%TYPE ) RETORNA boolean AS $$\nDECLARE\n  result boolean ;\n  curr_pid integer ;\n  curr_stat_id integer ;\n  doc_man_id integer ;\nBEGIN \n  -- DBA tem acesso a todos os documentos\n  IF SESSION_USER = 'curr_dba'\n  THEN\n    RETURN TRUE ;\n  END IF ;\n  --------------------------------\n\n  --Se o documento tem a marca 'deletado' - n\u00e3o mostrar na sele\u00e7\u00e3o\n  SELECT\n    is_del\n  INTO\n    result\n  FROM\n    store.docs\n  WHERE\n    id = current_id ;\n IF result = TRUE\n THEN\n   RETURN FALSE ;\n END IF ;\n --------------------------------\n\n --Obter id do usu\u00e1rio atual\n SELECT\n   service_function.get_curr_pid ()\n INTO\n   curr_pid ;\n --------------------------------\n\n --Obter id do gerente do documento\n SELECT\n   man_id\n INTO\n   doc_man_id\n FROM\n   store.docs\n WHERE\n   id = current_id ;\n --------------------------------\n\n --Se o gerente do documento n\u00e3o for o usu\u00e1rio atual ou gerente n\u00e3o designado\n --adicionar documento \u00e0 sele\u00e7\u00e3o\n IF doc_man_id != curr_pid OR doc_man_id IS NULL\n THEN\n   RETURN TRUE  ;\n ELSE\n   --Obter o status atual do documento\n   SELECT\n     stat_id                                         \n   INTO\n     curr_statid\n   FROM\n     store.docs\n   WHERE\n     id = current_id ;\n    \n   --Se o status permitir visualizar o documento - adicionar documento \u00e0 sele\u00e7\u00e3o                     \n   IF curr_statid = 4 OR curr_statid = 9\n   THEN\n     RETURN TRUE ;\n   ELSE\n   --Caso contr\u00e1rio - excluir documento da sele\u00e7\u00e3o\n     RETURN FALSE ;\n    END IF ;\n  END IF ;\n  --------------------------------\n\n RETURN FALSE ;\nEND\n$$ LINGUAGEM plpgsql DEFINIDOR DE SEGURAN\u00c7A;\nALTER FUNCTION store.check_select( store.docs.id%TYPE  ) OWNER TO store ;\nREVOKE EXECUTE ON FUNCTION store.check_select( store.docs.id%TYPE  ) FROM public; \nGRANT EXECUTE ON FUNCTION store.check_select( store.docs.id%TYPE  ) TO service_functions; \n<\/code><\/pre>\n<p>\nVerifica\u00e7\u00e3o da possibilidade de realizar um INSERT de linha<\/p>\n<p>                        <b class=\"spoiler_title\">check_insert<\/b><\/p>\n<pre><code class=\"pgsql\">CRIE OU REPLACE FUNCTION store.check_insert ( current_id store.docs.id%TYPE ) RETORNA boolean AS $$\nDECLARE\n  curr_role_id integer ;\nBEGIN\n  --DBA pode adicionar linha em qualquer caso\n  IF SESSION_USER = 'curr_dba'\n  THEN\n    RETURN TRUE ;\n  END IF ;\n  --------------------------------\n\n --Obter id do papel do usu\u00e1rio atual \n SELECT\n   service_functions.current_rid()\n  INTO\n    curr_role_id ;\n --------------------------------\n\n--Se o papel permitir a cria\u00e7\u00e3o de um novo documento\n--permitir\nIF curr_role_id = 3 OR curr_role_id = 5     \nTHEN\n  RETURN TRUE ;\nEND IF ;\n--------------------------------\nRETURN FALSE  ;\nEND\n$$ LINGUAGEM plpgsql DEFINIDOR DE SEGURAN\u00c7A;\nALTER FUNCTION store.check_insert( store.docs.id%TYPE  ) OWNER TO store ;\nREVOKE EXECUTE ON FUNCTION store.check_insert( store.docs.id%TYPE  ) FROM public;\nGRANT EXECUTE ON FUNCTION store.check_insert( store.docs.id%TYPE  ) TO service_functions; \n<\/code><\/pre>\n<p>\nVerifica\u00e7\u00e3o da possibilidade de realizar um DELETE de linha<\/p>\n<p>                        <b class=\"spoiler_title\">check_delete<\/b><\/p>\n<pre><code class=\"pgsql\">CRIE OU REPLACE FUNCTION store.check_delete ( current_id store.docs.id%TYPE )\nRETORNA boolean AS $$\nBEGIN  \n  --Apenas o DBA pode excluir linha \n  IF SESSION_USER = 'curr_dba'\n  THEN\n    RETURN TRUE ;\n  END IF ;\n  --------------------------------\n\n  RETURN FALSE ;\nEND\n$$ LINGUAGEM plpgsql\nDEFINIDOR DE SEGURAN\u00c7A;\nALTER FUNCTION store.check_delete( store.docs.id%TYPE  ) OWNER TO store ;\nREVOKE EXECUTE ON FUNCTION store.check_delete( store.docs.id%TYPE  ) FROM public;<\/code><\/pre>\n<p>\nVerifica\u00e7\u00e3o da possibilidade de realizar um UPDATE de linha.<\/p>\n<p>                        <b class=\"spoiler_title\">atualizar_usando<\/b><\/p>\n<pre><code class=\"pgsql\">CRIE OU SUBSTITUA A FUN\u00c7\u00c3O store.update_using ( current_id store.docs.id%TYPE , is_del boolean )\nRETORNA boolean AS $$\nCOME\u00c7AR  \n   --Documentos com status 'deletado' n\u00e3o podem ser editados\n   SE is_del \n   ENT\u00c3O\n     RETORNAR FALSO ;\n OUTRA\n    RETORNAR VERDADEIRO ;\n  FIM SE ;\n\nFIM\n$$ LINGUAGEM plpgsql DEFINIDOR DE SEGURAN\u00c7A;\nALTERAR FUN\u00c7\u00c3O store.update_using( store.docs.id%TYPE ,  boolean  ) PROPRIET\u00c1RIO PARA store ;\nREVOGAR EXECU\u00c7\u00c3O NA FUN\u00c7\u00c3O store.update_using( store.docs.id%TYPE ,  boolean  ) DE p\u00fablico;\nCONCEDER EXECU\u00c7\u00c3O NA FUN\u00c7\u00c3O store.update_using( store.docs.id%TYPE  ) A service_functions;<\/code><\/pre>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">atualizar_verifica\u00e7\u00e3o<\/b><\/p>\n<pre><code class=\"pgsql\">CRIE OU SUBSTITUA A FUN\u00c7\u00c3O store.update_with_check ( current_id store.docs.id%TYPE , is_del boolean )\nRETORNA boolean AS $$\nDECLARAR\n  current_rid inteiro ;\n  current_statid inteiro ;\nCOME\u00c7AR                \n\n  --DBA pode visualizar a linha \n  SE SESSION_USER = 'curr_dba'\n  ENT\u00c3O\n    RETORNAR VERDADEIRO ;\n  FIM SE ;\n  --------------------------------\n\n --Obter id da fun\u00e7\u00e3o do papel atual do usu\u00e1rio \n SELECIONAR\n   service_functions.current_rid()\n  PARA\n    curr_role_id ;\n --------------------------------                            \n\n --Remo\u00e7\u00e3o do documento - mudan\u00e7a de atributo \n SE is_deleted\n ENT\u00c3O\n   --Se o papel do usu\u00e1rio ***\n   SE current_role_id = 3        \n   ENT\u00c3O\n      SELECIONAR\n        stat_id                                          \n      PARA\n        curr_statid\n      DE\n        store.docs\n      ONDE\n        id = current_id ;\n\n      --Documento com status *** n\u00e3o pode ser deletado \n      SE current_status_id = 11\n      ENT\u00c3O\n         RETORNAR FALSO ;\n      OUTRA\n      --Pode deletar o documento em outros status\n        RETORNAR VERDADEIRO ;\n      FIM SE ;\n\n    --Caso contr\u00e1rio, se o papel do usu\u00e1rio ***\n    ELSIF current_role_id = 5            \n    ENT\u00c3O\n      --Todos os status do documento \n      RETORNAR VERDADEIRO ;\n    OUTRA\n      --Outros usu\u00e1rios n\u00e3o podem deletar documentos\n      RETORNAR FALSO ;\n    FIM SE ;\n SEN\u00c3O      \n   --Atualiza\u00e7\u00e3o do documento \u00e9 permitida\n    RETORNAR VERDADEIRO ;\nFIM SE ;\n\nRETORNAR FALSO ;\nFIM\n$$ LINGUAGEM plpgsql DEFINIDOR DE SEGURAN\u00c7A;\nALTERAR FUN\u00c7\u00c3O store.update_with_check( storg.docs.id%TYPE ,  boolean   ) PROPRIET\u00c1RIO PARA store ;\nREVOGAR EXECU\u00c7\u00c3O NA FUN\u00c7\u00c3O store.update_with_check( storg.docs.id%TYPE ,  boolean   )  DE p\u00fablico;\nCONCEDER EXECU\u00c7\u00c3O NA FUN\u00c7\u00c3O store.update_with_check( store.docs.id%TYPE  ) A service_functions;<\/code><\/pre>\n<p>\nAtiva\u00e7\u00e3o da pol\u00edtica de Row Level Security para a tabela.<\/p>\n<p>                        <b class=\"spoiler_title\">ATIVAR SEGURAN\u00c7A DE N\u00cdVEL DE LINHA<\/b><\/p>\n<pre><code class=\"pgsql\">ALTERAR TABELA store.docs ATIVAR SEGURAN\u00c7A DE N\u00cdVEL DE LINHA ;\n\nCRIAR POL\u00cdTICA doc_select SOBRE store.docs PARA SELECIONAR A service_functions USANDO ( (SELECIONAR store.check_select(id)) );\nCRIAR POL\u00cdTICA doc_insert SOBRE store.docs PARA INSERIR A service_functions COM VERIFICA\u00c7\u00c3O ( (SELECIONAR store.check_insert(id)) );\nCRIAR POL\u00cdTICA docs_delete SOBRE store.docs PARA DELETAR A service_functions USANDO ( (SELECIONAR store.check_delete(id)) );\n\nCRIAR POL\u00cdTICA doc_update_using SOBRE store.docs PARA ATUALIZAR A service_functions USANDO ( (SELECIONAR store.update_using(id , is_del )) );\nCRIAR POL\u00cdTICA doc_update_check SOBRE store.docs PARA ATUALIZAR A service_functions  COM VERIFICA\u00c7\u00c3O ( (SELECIONAR store.update_with_check(id , is_del )) );<\/code><\/pre>\n<p><\/p>\n<h2>Resultado<\/h2>\n<p>\nIsso funciona.<\/p>\n<p>A estrat\u00e9gia proposta permitiu transferir a implementa\u00e7\u00e3o do modelo de pap\u00e9is do n\u00edvel de fun\u00e7\u00f5es de neg\u00f3cios para o n\u00edvel de armazenamento de dados. <\/p>\n<p>As fun\u00e7\u00f5es podem ser usadas como um modelo para implementar modelos mais sofisticados de oculta\u00e7\u00e3o de dados, se os requisitos de neg\u00f3cios assim exigirem.<br \/>\n<br \/>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/516040\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0435\u043c\u044b \u042d\u0442\u044e\u0434 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Row Level Secutity \u0432 PostgreSQL \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u00ab\u0411\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u0411\u0414\u00bb, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u2014 \u042d\u0442\u044e\u0434 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 PostgreSQL \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Postgres Pro \u2014 \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u0442\u0440\u043e\u043a. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":92115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-92114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0435\u043c\u044b \u042d\u0442\u044e\u0434 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Row Level Secutity \u0432 PostgreSQL \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_PT\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u043e\u043b\u0435\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Row Level Security \u0432 PostgreSQL | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0435\u043c\u044b \u042d\u0442\u044e\u0434 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Row Level Secutity \u0432 PostgreSQL \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-08-23T17:41:56+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-08-23T17:41:56+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Implementa\u00e7\u00e3o de modelo de acesso baseado em fun\u00e7\u00e3o utilizando Row Level Security no PostgreSQL | ProHoster","description":"Desenvolvimento do tema Estudo sobre a implementa\u00e7\u00e3o de Row Level Security no PostgreSQL e para uma resposta abrangente sobre","canonical_url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"pt_PT","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u043e\u043b\u0435\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Row Level Security \u0432 PostgreSQL | ProHoster","og:description":"\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0442\u0435\u043c\u044b \u042d\u0442\u044e\u0434 \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Row Level Secutity \u0432 PostgreSQL \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430","og:url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/realizacziya-rolevoj-modeli-dostupa-s-ispolzovaniem-row-level-security-v-postgresql","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-08-23T17:41:56+00:00","article:modified_time":"2020-08-23T17:41:56+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"92114","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 12:14:23","updated":"2022-10-06 10:04:45","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/92114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/comments?post=92114"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/92114\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media\/92115"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media?parent=92114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/categories?post=92114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/tags?post=92114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}