1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2024-11-24 08:42:27 +02:00

Add clarification about comments

As suggested by ilmari on IRC
This commit is contained in:
Hubert depesz Lubaczewski 2023-03-27 15:42:58 +02:00
parent 2f481dddc7
commit 937cf53ddc
2 changed files with 41 additions and 2 deletions

View File

@ -222,6 +222,7 @@ sub index {
my $comments = $self->req->param( 'comments' );
if ( defined $comments ) {
$comments = undef if $comments =~ m{\A\s*\z};
$comments = undef if $comments =~ m{\A\s*for\s+example:\s+\$\s+\\d\s+pg_proc}ism;
}
# try

View File

@ -71,8 +71,46 @@ SELECT a, b
FROM c
WHERE d > now() - '5 minutes'::interval;"></textarea>
<label for="comments">Optionally add some comments here:</label>
<textarea id="comments" name="comments"></textarea>
<label for="comments">Optionally add some comments (such as table definitions) here:</label>
<textarea id="comments" name="comments" class="auto-hint" title="For example:
$ \d pg_proc
Table &quot;pg_catalog.pg_proc&quot;
Column │ Type │ Collation │ Nullable │ Default
─────────────────┼──────────────┼───────────┼──────────┼─────────
oid │ oid │ │ not null │
proname │ name │ │ not null │
pronamespace │ oid │ │ not null │
proowner │ oid │ │ not null │
prolang │ oid │ │ not null │
procost │ real │ │ not null │
prorows │ real │ │ not null │
provariadic │ oid │ │ not null │
prosupport │ regproc │ │ not null │
prokind │ &quot;char&quot; │ │ not null │
prosecdef │ boolean │ │ not null │
proleakproof │ boolean │ │ not null │
proisstrict │ boolean │ │ not null │
proretset │ boolean │ │ not null │
provolatile │ &quot;char&quot; │ │ not null │
proparallel │ &quot;char&quot; │ │ not null │
pronargs │ smallint │ │ not null │
pronargdefaults │ smallint │ │ not null │
prorettype │ oid │ │ not null │
proargtypes │ oidvector │ │ not null │
proallargtypes │ oid[] │ │ │
proargmodes │ &quot;char&quot;[] │ │ │
proargnames │ text[] │ C │ │
proargdefaults │ pg_node_tree │ C │ │
protrftypes │ oid[] │ │ │
prosrc │ text │ C │ not null │
probin │ text │ C │ │
prosqlbody │ pg_node_tree │ C │ │
proconfig │ text[] │ C │ │
proacl │ aclitem[] │ │ │
Indexes:
&quot;pg_proc_oid_index&quot; PRIMARY KEY, btree (oid)
&quot;pg_proc_proname_args_nsp_index&quot; UNIQUE CONSTRAINT, btree (proname, proargtypes, pronamespace)
"></textarea>
</div>