다음 표에는 특정 시퀀스 작업을 수행할 때 필요한 권한에 대한 세부정보가 포함되어 있습니다.
작업
권한 요구사항
GoogleSQL:
GET_NEXT_SEQUENCE_VALUE()
PostgreSQL:
nextval()
시퀀스에 대한 UPDATE 또는 SELECT 권한이 필요합니다. 생성된 열이나 기본값을 통해 이 함수를 실행하는 경우 열에 대한 INSERT 또는 UPDATE 권한도 있어야 합니다. 시퀀스에 대한 UPDATE 권한은 시퀀스를 사용하려는 열에 대한 어떠한 권한도 자동으로 부여하지 않습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Fine-grained access control for sequences\n\nThis page explains how [fine-grained access control](/spanner/docs/fgac-about) works with\nSpanner sequences for GoogleSQL-dialect databases and PostgreSQL-dialect databases.\n\nFor fine-grained access control users, you can grant either one or both of the\nfollowing privileges to allow access to read sequence information or\ngenerate values from the sequence.\n\n- Grant `SELECT` on the sequence to allow read access to the parameters\n and current state of the sequence.\n\n ### GoogleSQL\n\n ```sql\n GRANT SELECT ON SEQUENCE SEQUENCE_NAME TO ROLE ROLE_NAME;\n ```\n\n ### PostgreSQL\n\n ```sql\n GRANT SELECT ON SEQUENCE SEQUENCE_NAME TO ROLE_NAME;\n ```\n- Grant `UPDATE` on the sequence to allow calls to the sequence value\n generator.\n\n ### GoogleSQL\n\n ```sql\n GRANT UPDATE ON SEQUENCE SEQUENCE_NAME TO ROLE ROLE_NAME;\n ```\n\n ### PostgreSQL\n\n ```sql\n GRANT UPDATE ON SEQUENCE SEQUENCE_NAME TO ROLE_NAME;\n ```\n\nRequired privileges for sequence operations\n-------------------------------------------\n\nThe following table contains details about which privileges you require when\nperforming a specific sequence operations.\n\nWhat's next\n-----------\n\n- Learn more about using [sequences](/spanner/docs/primary-key-default-value#bit-reversed-sequence) in Spanner.\n- Learn about `SEQUENCE` for [GoogleSQL](/spanner/docs/reference/standard-sql/data-definition-language#sequence_statements) or [PostgreSQL](/spanner/docs/reference/postgresql/data-definition-language#sequence_statements).\n- Learn about sequence functions in [GoogleSQL](/spanner/docs/reference/standard-sql/sequence_functions) or [PostgreSQL](/spanner/docs/reference/postgresql/functions-and-operators#sequence).\n- Learn about sequences in the `INFORMATION_SCHEMA` in [GoogleSQL](/spanner/docs/information-schema#sequences) or [PostgreSQL](/spanner/docs/information-schema-pg#sequences)."]]