Re: proposal: schema variables
Pavel Stehule <pavel.stehule@gmail.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Move WAL sequence code into its own file
- a87987cafca6 19 (unreleased) cited
-
Add ExplainState argument to pg_plan_query() and planner().
- c83ac02ec730 19 (unreleased) cited
-
Don't include access/htup_details.h in executor/tuptable.h
- 1a8b5b11e48a 19 (unreleased) cited
-
Refactor to avoid code duplication in transformPLAssignStmt.
- b0fb2c6aa5a4 19 (unreleased) cited
-
Avoid including commands/dbcommands.h in so many places
- 325fc0ab14d1 19 (unreleased) cited
-
Restrict psql meta-commands in plain-text dumps.
- 71ea0d679543 19 (unreleased) cited
-
Split func.sgml into more manageable pieces
- 4e23c9ef65ac 19 (unreleased) cited
-
Fix squashing algorithm for query texts
- 0f65f3eec478 18.0 cited
-
EXPLAIN: Always use two fractional digits for row counts.
- 95dbd827f2ed 18.0 cited
-
Preliminary refactoring of plpgsql expression construction.
- a654af21ae52 18.0 cited
-
plpgsql: pure parser and reentrant scanner
- 7b27f5fd36cb 18.0 cited
-
Add some sanity checks in executor for query ID reporting
- 24f520594809 18.0 cited
-
Fix misleading error message context
- 4af123ad45bd 18.0 cited
-
Add macros for looping through a List without a ListCell.
- 14dd0f27d7cd 17.0 cited
Attachments
- v20241211-0018-expression-with-session-variables-can-be-inlined.patch (text/x-patch) patch v20241211-0018
- v20241211-0021-pg_restore-A-variable.patch (text/x-patch) patch v20241211-0021
- v20241211-0019-this-patch-changes-error-message-column-doesn-t-exis.patch (text/x-patch) patch v20241211-0019
- v20241211-0020-transactional-variables.patch (text/x-patch) patch v20241211-0020
- v20241211-0017-plpgsql-implementation-for-LET-statement.patch (text/x-patch) patch v20241211-0017
- v20241211-0016-allow-parallel-execution-queries-with-session-variab.patch (text/x-patch) patch v20241211-0016
- v20241211-0014-Implementation-of-NOT-NULL-and-IMMUTABLE-clauses.patch (text/x-patch) patch v20241211-0014
- v20241211-0015-allow-read-an-value-of-session-variable-directly-fro.patch (text/x-patch) patch v20241211-0015
- v20241211-0012-Implementation-ON-TRANSACTION-END-RESET-clause.patch (text/x-patch) patch v20241211-0012
- v20241211-0013-Implementation-of-DEFAULT-clause-default-expressions.patch (text/x-patch) patch v20241211-0013
- v20241211-0010-PREPARE-LET-support.patch (text/x-patch) patch v20241211-0010
- v20241211-0011-implementation-of-temporary-session-variables.patch (text/x-patch) patch v20241211-0011
- v20241211-0009-EXPLAIN-LET-support.patch (text/x-patch) patch v20241211-0009
- v20241211-0008-variable-fence-syntax-support-and-variable-fence-usa.patch (text/x-patch) patch v20241211-0008
- v20241211-0007-GUC-session_variables_ambiguity_warning.patch (text/x-patch) patch v20241211-0007
- v20241211-0006-plpgsql-tests.patch (text/x-patch) patch v20241211-0006
- v20241211-0005-memory-cleaning-after-DROP-VARIABLE.patch (text/x-patch) patch v20241211-0005
- v20241211-0004-DISCARD-VARIABLES.patch (text/x-patch) patch v20241211-0004
- v20241211-0003-function-pg_session_variables-for-cleaning-tests.patch (text/x-patch) patch v20241211-0003
- v20241211-0002-Storage-for-session-variables-and-SQL-interface.patch (text/x-patch) patch v20241211-0002
- v20241211-0001-Enhancing-catalog-for-support-session-variables-and-.patch (text/x-patch) patch v20241211-0001
Hi
út 10. 12. 2024 v 4:32 odesílatel jian he <jian.universality@gmail.com>
napsal:
> hi.
>
> GRANT|REVOKE ALL VARIABLES IN SCHEMA schema_name [, ...] }
> seems to work.
> might be better to add tests.
>
done
>
> also src/bin/psql/tab-complete.in.c
> COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_grantables,
> we can also add "ALL VARIABLES IN SCHEMA "
>
done
>
> also need change this <para> in grant.sgml:
> <para>
> There is also an option to grant privileges on all objects of the same
> type within one or more schemas. This functionality is currently
> supported
> only for tables, sequences, functions, and procedures. <literal>ALL
> TABLES</literal> also affects views and foreign tables, just like the
> specific-object <command>GRANT</command> command. <literal>ALL
> FUNCTIONS</literal> also affects aggregate and window functions, but not
> procedures, again just like the specific-object <command>GRANT</command>
> command. Use <literal>ALL ROUTINES</literal> to include procedures.
> </para>
>
done
>
> revoke.sgml, we should use <replaceable
> class="parameter">role_specification</replaceable>?
> so it will become like:
>
> REVOKE [ GRANT OPTION FOR ]
> { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }
> ON { VARIABLE variable_name [, ...]
> | ALL VARIABLES IN SCHEMA schema_name [, ...] }
> FROM role_specification [, ...]
>
done
>
> maybe also add
> [ GRANTED BY role_specification ]
> but I didn't test "REVOKE [ GRANTED BY role_specification ]".
>
It i working, so I enhanced doc and regress tests
>
> Speaking of acl tests,
> similar to has_table_privilege I am afraid we need to have a function
> like has_variable_privilege for acl tests.
> has_table_privilege has 6 function signatures. so there will be more code.
>
ok, I wrote these functions
> ------------------------------------------------------
> doc/src/sgml/ref/create_variable.sgml
> <synopsis> section:
> CREATE VARIABLE [ IF NOT EXISTS ] name [ AS ] data_type ] [ COLLATE
> collation ]
>
> redundant right square bracket after "data_type".
>
fixed
Regards
Pavel