mirror of https://github.com/Wilfred/difftastic/
Add 'vendor/tree-sitter-sql/' from commit '218b672499729ef71e4d66a949e4a1614488aeaa'
git-subtree-dir: vendor/tree-sitter-sql git-subtree-mainline:pull/315/head144f7d9e30git-subtree-split:218b672499
commit
a9fb2638d0
@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*.{js,html,txt}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@ -0,0 +1,3 @@
|
||||
/src/** linguist-vendored
|
||||
/examples/* linguist-vendored
|
||||
* text=auto eof=lf
|
||||
@ -0,0 +1,60 @@
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-2019, macos-latest]
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npx prettier --check .
|
||||
- run: npm run gen
|
||||
- name: Verify generated code
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
if ! git diff --quiet --ignore-submodules -- src/
|
||||
then
|
||||
echo >&2 "Generated files in src/ differ, please run 'npm run gen' to update generated code"
|
||||
git diff-index --name-status -r --ignore-submodules HEAD src/ >&2
|
||||
exit 1
|
||||
fi
|
||||
- run: npm test
|
||||
- name: Parse real world examples (ignoring errors for now)
|
||||
continue-on-error: true
|
||||
run: npm acceptance
|
||||
|
||||
compile:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
compiler: [gcc, clang++]
|
||||
|
||||
name: compile
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- if: matrix.os == 'windows-latest' && matrix.compiler == 'gcc'
|
||||
uses: egor-tensin/setup-mingw@v2
|
||||
|
||||
- name: build
|
||||
run: ${{ matrix.compiler }} -o scanner.o -I./src -c src/scanner.cc -Werror
|
||||
@ -0,0 +1,22 @@
|
||||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
tree-sitter-sql.wasm
|
||||
target/
|
||||
build/
|
||||
venv/
|
||||
yarn.lock
|
||||
@ -0,0 +1,5 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: "v2.7.1"
|
||||
hooks:
|
||||
- id: prettier
|
||||
@ -0,0 +1,6 @@
|
||||
README.md
|
||||
.github/
|
||||
bindings/
|
||||
target/
|
||||
src/
|
||||
docs/vendor/
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"trailingComma": "all",
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter"
|
||||
version = "0.19.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad726ec26496bf4c083fff0f43d4eb3a2ad1bba305323af5ff91383c0b6ecac0"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-sql"
|
||||
version = "0.0.2"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
]
|
||||
@ -0,0 +1,27 @@
|
||||
[package]
|
||||
name = "tree-sitter-sql"
|
||||
description = "SQL grammar for the tree-sitter parsing library"
|
||||
authors = ["Maksim Novikov <mnovikov.work@gmail.com>"]
|
||||
version = "0.0.2"
|
||||
keywords = ["incremental", "parsing", "sql"]
|
||||
categories = ["parsing", "text-editors"]
|
||||
repository = "https://github.com/m-novikov/tree-sitter-sql"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
|
||||
build = "bindings/rust/build.rs"
|
||||
include = [
|
||||
"bindings/rust/*",
|
||||
"grammar.js",
|
||||
"queries/*",
|
||||
"src/*",
|
||||
]
|
||||
|
||||
[lib]
|
||||
path = "bindings/rust/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
tree-sitter = "0.19.3"
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0"
|
||||
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Maksim Novikov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@ -0,0 +1,49 @@
|
||||
[](https://github.com/m-novikov/tree-sitter-sql/actions/workflows/node.js.yml)
|
||||
|
||||
# SQL syntax for tree-sitter
|
||||
|
||||
This project initially focuses on PostgreSQL flavor of SQL
|
||||
|
||||
## Try it out
|
||||
|
||||
You can try out the parser here: [Tree Sitter SQL Playground](https://m-novikov.github.io/tree-sitter-sql/)
|
||||
|
||||
## Development
|
||||
|
||||
Install [pre-commit](https://pre-commit.com/#install) and run `pre-commit install` in the root of this repo. This will ensure
|
||||
that code follows code style of this repo.
|
||||
|
||||
File describing grammar is [grammar.js](./grammar.js)
|
||||
|
||||
Every time the grammar file changes code generation needs to be run by invoking `npm run gen`
|
||||
|
||||
`npm test` command automatically performs code generation
|
||||
|
||||
Tests files are located in [test/corpus](./test/corpus)
|
||||
|
||||
[Here](https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test) is the documentation on test file syntax
|
||||
|
||||
### Running tests
|
||||
|
||||
```
|
||||
npm install --also=dev
|
||||
npm test
|
||||
```
|
||||
|
||||
### Debbuging
|
||||
|
||||
* `npm run parse <file.sql>` outputs a syntax tree
|
||||
* `npm run extract-error <file.sql>` shows first offending line
|
||||
|
||||
### Goals
|
||||
|
||||
This parser is supposed to be used in text editors. As a result:
|
||||
|
||||
* it's very lax in what it considers valid SQL parse
|
||||
* adding extra nodes to have convenient selection anchors is okay
|
||||
|
||||
### Other projects
|
||||
|
||||
* https://github.com/DerekStride/tree-sitter-sql
|
||||
* https://github.com/dhcmrlchtdj/tree-sitter-sqlite
|
||||
*
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"target_name": "tree_sitter_sql_binding",
|
||||
"include_dirs": [
|
||||
"<!(node -e \"require('nan')\")",
|
||||
"src"
|
||||
],
|
||||
"sources": [
|
||||
"bindings/node/binding.cc",
|
||||
"src/parser.c",
|
||||
"src/scanner.cc"
|
||||
],
|
||||
"cflags_c": [
|
||||
"-std=c99",
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
#include "tree_sitter/parser.h"
|
||||
#include <node.h>
|
||||
#include "nan.h"
|
||||
|
||||
using namespace v8;
|
||||
|
||||
extern "C" TSLanguage * tree_sitter_sql();
|
||||
|
||||
namespace {
|
||||
|
||||
NAN_METHOD(New) {}
|
||||
|
||||
void Init(Local<Object> exports, Local<Object> module) {
|
||||
Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New);
|
||||
tpl->SetClassName(Nan::New("Language").ToLocalChecked());
|
||||
tpl->InstanceTemplate()->SetInternalFieldCount(1);
|
||||
|
||||
Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
|
||||
Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
|
||||
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_sql());
|
||||
|
||||
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("sql").ToLocalChecked());
|
||||
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
|
||||
}
|
||||
|
||||
NODE_MODULE(tree_sitter_sql_binding, Init)
|
||||
|
||||
} // namespace
|
||||
@ -0,0 +1,19 @@
|
||||
try {
|
||||
module.exports = require("../../build/Release/tree_sitter_sql_binding");
|
||||
} catch (error1) {
|
||||
if (error1.code !== 'MODULE_NOT_FOUND') {
|
||||
throw error1;
|
||||
}
|
||||
try {
|
||||
module.exports = require("../../build/Debug/tree_sitter_sql_binding");
|
||||
} catch (error2) {
|
||||
if (error2.code !== 'MODULE_NOT_FOUND') {
|
||||
throw error2;
|
||||
}
|
||||
throw error1
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
module.exports.nodeTypeInfo = require("../../src/node-types.json");
|
||||
} catch (_) {}
|
||||
@ -0,0 +1,29 @@
|
||||
fn main() {
|
||||
let src_dir = std::path::Path::new("src");
|
||||
|
||||
let mut c_config = cc::Build::new();
|
||||
c_config.include(&src_dir);
|
||||
c_config
|
||||
.flag_if_supported("-Wno-unused-parameter")
|
||||
.flag_if_supported("-Wno-unused-but-set-variable")
|
||||
.flag_if_supported("-Wno-trigraphs");
|
||||
let parser_path = src_dir.join("parser.c");
|
||||
c_config.file(&parser_path);
|
||||
|
||||
c_config.compile("parser");
|
||||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
||||
|
||||
// If your language uses an external scanner written in C++,
|
||||
// then include this block of code:
|
||||
|
||||
let mut cpp_config = cc::Build::new();
|
||||
cpp_config.cpp(true);
|
||||
cpp_config.include(&src_dir);
|
||||
cpp_config
|
||||
.flag_if_supported("-Wno-unused-parameter")
|
||||
.flag_if_supported("-Wno-unused-but-set-variable");
|
||||
let scanner_path = src_dir.join("scanner.cc");
|
||||
cpp_config.file(&scanner_path);
|
||||
cpp_config.compile("scanner");
|
||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
//! This crate provides SQL language support for the [tree-sitter][] parsing library.
|
||||
//!
|
||||
//! Typically, you will use the [language][language func] function to add this language to a
|
||||
//! tree-sitter [Parser][], and then use the parser to parse some code:
|
||||
//!
|
||||
//! ```
|
||||
//! let code = "";
|
||||
//! let mut parser = tree_sitter::Parser::new();
|
||||
//! parser.set_language(tree_sitter_sql::language()).expect("Error loading SQL grammar");
|
||||
//! let tree = parser.parse(code, None).unwrap();
|
||||
//! ```
|
||||
//!
|
||||
//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
|
||||
//! [language func]: fn.language.html
|
||||
//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
|
||||
//! [tree-sitter]: https://tree-sitter.github.io/
|
||||
|
||||
use tree_sitter::Language;
|
||||
|
||||
extern "C" {
|
||||
fn tree_sitter_sql() -> Language;
|
||||
}
|
||||
|
||||
/// Get the tree-sitter [Language][] for this grammar.
|
||||
///
|
||||
/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
|
||||
pub fn language() -> Language {
|
||||
unsafe { tree_sitter_sql() }
|
||||
}
|
||||
|
||||
/// The content of the [`node-types.json`][] file for this grammar.
|
||||
///
|
||||
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
|
||||
pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json");
|
||||
|
||||
// Uncomment these to include any queries that this grammar contains
|
||||
|
||||
// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm");
|
||||
// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm");
|
||||
// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm");
|
||||
// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm");
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn test_can_load_grammar() {
|
||||
let mut parser = tree_sitter::Parser::new();
|
||||
parser
|
||||
.set_language(super::language())
|
||||
.expect("Error loading SQL language");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Tree Sitter SQL Playground</title>
|
||||
<style>
|
||||
#playground-container {
|
||||
max-width: 640px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#playground-container .CodeMirror {
|
||||
border: 1px solid;
|
||||
}
|
||||
#create-issue-btn {
|
||||
padding: 0.2em;
|
||||
float: right;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#checkboxes {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
#output-container {
|
||||
border: 1px solid;
|
||||
}
|
||||
.highlight {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
This file is licensed under MIT license
|
||||
Copyright (c) 2018 Max Brunsfeld
|
||||
Taken from https://github.com/tree-sitter/tree-sitter/docs/section-7-playground.html
|
||||
-->
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/clusterize.js/0.18.0/clusterize.min.css"
|
||||
/>
|
||||
|
||||
<div id="playground-container">
|
||||
<h1>Tree Sitter SQL Playground</h1>
|
||||
<h4>Code</h4>
|
||||
<div id="checkboxes">
|
||||
<input id="logging-checkbox" type="checkbox" />
|
||||
<label for="logging-checkbox">Log</label>
|
||||
|
||||
<input id="query-checkbox" type="checkbox" />
|
||||
<label for="query-checkbox">Query</label>
|
||||
</div>
|
||||
|
||||
<textarea id="code-input">
|
||||
SELECT a, b
|
||||
FROM foo
|
||||
WHERE a > b
|
||||
GROUP BY b;</textarea
|
||||
>
|
||||
|
||||
<div id="query-container" style="visibility: hidden; position: absolute">
|
||||
<h4>Query</h4>
|
||||
<textarea id="query-input"></textarea>
|
||||
</div>
|
||||
|
||||
<h4>Tree</h4>
|
||||
<span id="update-time"></span>
|
||||
<div id="output-container-scroll">
|
||||
<pre id="output-container" class="highlight"></pre>
|
||||
</div>
|
||||
<button id="create-issue-btn" type="button">Create Issue</button>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clusterize.js/0.18.0/clusterize.min.js"></script>
|
||||
<script src="./vendor/tree-sitter.js"></script>
|
||||
<script id="playground-script" src="./playground.js?v=3"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,497 @@
|
||||
// This file is licensed under MIT license
|
||||
// Copyright (c) 2018 Max Brunsfeld
|
||||
// Taken from https://github.com/tree-sitter/tree-sitter/docs/assets/playground.js
|
||||
let tree;
|
||||
|
||||
(async () => {
|
||||
const CAPTURE_REGEX = /@\s*([\w\._-]+)/g;
|
||||
const COLORS_BY_INDEX = [
|
||||
"blue",
|
||||
"chocolate",
|
||||
"darkblue",
|
||||
"darkcyan",
|
||||
"darkgreen",
|
||||
"darkred",
|
||||
"darkslategray",
|
||||
"dimgray",
|
||||
"green",
|
||||
"indigo",
|
||||
"navy",
|
||||
"red",
|
||||
"sienna",
|
||||
];
|
||||
|
||||
const scriptURL = document.getElementById("playground-script").src;
|
||||
|
||||
const codeInput = document.getElementById("code-input");
|
||||
const loggingCheckbox = document.getElementById("logging-checkbox");
|
||||
const outputContainer = document.getElementById("output-container");
|
||||
const outputContainerScroll = document.getElementById(
|
||||
"output-container-scroll",
|
||||
);
|
||||
const playgroundContainer = document.getElementById("playground-container");
|
||||
const queryCheckbox = document.getElementById("query-checkbox");
|
||||
const createIssueBtn = document.getElementById("create-issue-btn");
|
||||
const queryContainer = document.getElementById("query-container");
|
||||
const queryInput = document.getElementById("query-input");
|
||||
const updateTimeSpan = document.getElementById("update-time");
|
||||
|
||||
loadState();
|
||||
|
||||
await TreeSitter.init();
|
||||
|
||||
const parser = new TreeSitter();
|
||||
const codeEditor = CodeMirror.fromTextArea(codeInput, {
|
||||
lineNumbers: true,
|
||||
showCursorWhenSelecting: true,
|
||||
});
|
||||
|
||||
const queryEditor = CodeMirror.fromTextArea(queryInput, {
|
||||
lineNumbers: true,
|
||||
showCursorWhenSelecting: true,
|
||||
});
|
||||
|
||||
const cluster = new Clusterize({
|
||||
rows: [],
|
||||
noDataText: null,
|
||||
contentElem: outputContainer,
|
||||
scrollElem: outputContainerScroll,
|
||||
});
|
||||
const renderTreeOnCodeChange = debounce(renderTree, 50);
|
||||
const saveStateOnChange = debounce(saveState, 2000);
|
||||
const runTreeQueryOnChange = debounce(runTreeQuery, 50);
|
||||
|
||||
let languageName = "sql";
|
||||
let treeRows = null;
|
||||
let treeRowHighlightedIndex = -1;
|
||||
let parseCount = 0;
|
||||
let isRendering = 0;
|
||||
let query;
|
||||
|
||||
codeEditor.on("changes", handleCodeChange);
|
||||
codeEditor.on("viewportChange", runTreeQueryOnChange);
|
||||
codeEditor.on("cursorActivity", debounce(handleCursorMovement, 150));
|
||||
queryEditor.on("changes", debounce(handleQueryChange, 150));
|
||||
|
||||
loggingCheckbox.addEventListener("change", handleLoggingChange);
|
||||
queryCheckbox.addEventListener("change", handleQueryEnableChange);
|
||||
outputContainer.addEventListener("click", handleTreeClick);
|
||||
createIssueBtn.addEventListener("click", handleCreateIssue);
|
||||
handleQueryEnableChange();
|
||||
await loadLanguage();
|
||||
|
||||
playgroundContainer.style.visibility = "visible";
|
||||
|
||||
async function loadLanguage() {
|
||||
const query = new URL(scriptURL).search;
|
||||
const url = `tree-sitter-sql.wasm${query}`;
|
||||
const language = await TreeSitter.Language.load(url);
|
||||
tree = null;
|
||||
parser.setLanguage(language);
|
||||
handleCodeChange();
|
||||
handleQueryChange();
|
||||
}
|
||||
|
||||
async function handleCodeChange(editor, changes) {
|
||||
const newText = codeEditor.getValue() + "\n";
|
||||
const edits = tree && changes && changes.map(treeEditForEditorChange);
|
||||
|
||||
const start = performance.now();
|
||||
if (edits) {
|
||||
for (const edit of edits) {
|
||||
tree.edit(edit);
|
||||
}
|
||||
}
|
||||
const newTree = parser.parse(newText, tree);
|
||||
const duration = (performance.now() - start).toFixed(1);
|
||||
|
||||
updateTimeSpan.innerText = `${duration} ms`;
|
||||
if (tree) tree.delete();
|
||||
tree = newTree;
|
||||
parseCount++;
|
||||
renderTreeOnCodeChange();
|
||||
runTreeQueryOnChange();
|
||||
saveStateOnChange();
|
||||
}
|
||||
|
||||
async function renderTree() {
|
||||
isRendering++;
|
||||
const cursor = tree.walk();
|
||||
|
||||
let currentRenderCount = parseCount;
|
||||
let row = "";
|
||||
let rows = [];
|
||||
let finishedRow = false;
|
||||
let visitedChildren = false;
|
||||
let indentLevel = 0;
|
||||
|
||||
for (let i = 0; ; i++) {
|
||||
if (i > 0 && i % 10000 === 0) {
|
||||
await new Promise(r => setTimeout(r, 0));
|
||||
if (parseCount !== currentRenderCount) {
|
||||
cursor.delete();
|
||||
isRendering--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let displayName;
|
||||
if (cursor.nodeIsMissing) {
|
||||
displayName = `MISSING ${cursor.nodeType}`;
|
||||
} else if (cursor.nodeIsNamed) {
|
||||
displayName = cursor.nodeType;
|
||||
}
|
||||
|
||||
if (visitedChildren) {
|
||||
if (displayName) {
|
||||
finishedRow = true;
|
||||
}
|
||||
|
||||
if (cursor.gotoNextSibling()) {
|
||||
visitedChildren = false;
|
||||
} else if (cursor.gotoParent()) {
|
||||
visitedChildren = true;
|
||||
indentLevel--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (displayName) {
|
||||
if (finishedRow) {
|
||||
row += "</div>";
|
||||
rows.push(row);
|
||||
finishedRow = false;
|
||||
}
|
||||
const start = cursor.startPosition;
|
||||
const end = cursor.endPosition;
|
||||
const id = cursor.nodeId;
|
||||
let fieldName = cursor.currentFieldName();
|
||||
if (fieldName) {
|
||||
fieldName += ": ";
|
||||
} else {
|
||||
fieldName = "";
|
||||
}
|
||||
row = `<div>${" ".repeat(
|
||||
indentLevel,
|
||||
)}${fieldName}<a class='plain' href="#" data-id=${id} data-range="${
|
||||
start.row
|
||||
},${start.column},${end.row},${end.column}">${displayName}</a> [${
|
||||
start.row
|
||||
}, ${start.column}] - [${end.row}, ${end.column}])`;
|
||||
finishedRow = true;
|
||||
}
|
||||
|
||||
if (cursor.gotoFirstChild()) {
|
||||
visitedChildren = false;
|
||||
indentLevel++;
|
||||
} else {
|
||||
visitedChildren = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (finishedRow) {
|
||||
row += "</div>";
|
||||
rows.push(row);
|
||||
}
|
||||
|
||||
cursor.delete();
|
||||
cluster.update(rows);
|
||||
treeRows = rows;
|
||||
isRendering--;
|
||||
handleCursorMovement();
|
||||
}
|
||||
|
||||
function runTreeQuery(_, startRow, endRow) {
|
||||
if (endRow == null) {
|
||||
const viewport = codeEditor.getViewport();
|
||||
startRow = viewport.from;
|
||||
endRow = viewport.to;
|
||||
}
|
||||
|
||||
codeEditor.operation(() => {
|
||||
const marks = codeEditor.getAllMarks();
|
||||
marks.forEach(m => m.clear());
|
||||
|
||||
if (tree && query) {
|
||||
const captures = query.captures(
|
||||
tree.rootNode,
|
||||
{ row: startRow, column: 0 },
|
||||
{ row: endRow, column: 0 },
|
||||
);
|
||||
let lastNodeId;
|
||||
for (const { name, node } of captures) {
|
||||
if (node.id === lastNodeId) continue;
|
||||
lastNodeId = node.id;
|
||||
const { startPosition, endPosition } = node;
|
||||
codeEditor.markText(
|
||||
{ line: startPosition.row, ch: startPosition.column },
|
||||
{ line: endPosition.row, ch: endPosition.column },
|
||||
{
|
||||
inclusiveLeft: true,
|
||||
inclusiveRight: true,
|
||||
css: `color: ${colorForCaptureName(name)}`,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleQueryChange() {
|
||||
if (query) {
|
||||
query.delete();
|
||||
query.deleted = true;
|
||||
query = null;
|
||||
}
|
||||
|
||||
queryEditor.operation(() => {
|
||||
queryEditor.getAllMarks().forEach(m => m.clear());
|
||||
if (!queryCheckbox.checked) return;
|
||||
|
||||
const queryText = queryEditor.getValue();
|
||||
|
||||
try {
|
||||
query = parser.getLanguage().query(queryText);
|
||||
let match;
|
||||
|
||||
let row = 0;
|
||||
queryEditor.eachLine(line => {
|
||||
while ((match = CAPTURE_REGEX.exec(line.text))) {
|
||||
queryEditor.markText(
|
||||
{ line: row, ch: match.index },
|
||||
{ line: row, ch: match.index + match[0].length },
|
||||
{
|
||||
inclusiveLeft: true,
|
||||
inclusiveRight: true,
|
||||
css: `color: ${colorForCaptureName(match[1])}`,
|
||||
},
|
||||
);
|
||||
}
|
||||
row++;
|
||||
});
|
||||
} catch (error) {
|
||||
const startPosition = queryEditor.posFromIndex(error.index);
|
||||
const endPosition = {
|
||||
line: startPosition.line,
|
||||
ch: startPosition.ch + (error.length || Infinity),
|
||||
};
|
||||
|
||||
if (error.index === queryText.length) {
|
||||
if (startPosition.ch > 0) {
|
||||
startPosition.ch--;
|
||||
} else if (startPosition.row > 0) {
|
||||
startPosition.row--;
|
||||
startPosition.column = Infinity;
|
||||
}
|
||||
}
|
||||
|
||||
queryEditor.markText(startPosition, endPosition, {
|
||||
className: "query-error",
|
||||
inclusiveLeft: true,
|
||||
inclusiveRight: true,
|
||||
attributes: { title: error.message },
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
runTreeQuery();
|
||||
saveQueryState();
|
||||
}
|
||||
|
||||
function handleCursorMovement() {
|
||||
if (isRendering) return;
|
||||
|
||||
const selection = codeEditor.getDoc().listSelections()[0];
|
||||
let start = { row: selection.anchor.line, column: selection.anchor.ch };
|
||||
let end = { row: selection.head.line, column: selection.head.ch };
|
||||
if (
|
||||
start.row > end.row ||
|
||||
(start.row === end.row && start.column > end.column)
|
||||
) {
|
||||
let swap = end;
|
||||
end = start;
|
||||
start = swap;
|
||||
}
|
||||
const node = tree.rootNode.namedDescendantForPosition(start, end);
|
||||
if (treeRows) {
|
||||
if (treeRowHighlightedIndex !== -1) {
|
||||
const row = treeRows[treeRowHighlightedIndex];
|
||||
if (row)
|
||||
treeRows[treeRowHighlightedIndex] = row.replace(
|
||||
"highlighted",
|
||||
"plain",
|
||||
);
|
||||
}
|
||||
treeRowHighlightedIndex = treeRows.findIndex(row =>
|
||||
row.includes(`data-id=${node.id}`),
|
||||
);
|
||||
if (treeRowHighlightedIndex !== -1) {
|
||||
const row = treeRows[treeRowHighlightedIndex];
|
||||
if (row)
|
||||
treeRows[treeRowHighlightedIndex] = row.replace(
|
||||
"plain",
|
||||
"highlighted",
|
||||
);
|
||||
}
|
||||
cluster.update(treeRows);
|
||||
const lineHeight = cluster.options.item_height;
|
||||
const scrollTop = outputContainerScroll.scrollTop;
|
||||
const containerHeight = outputContainerScroll.clientHeight;
|
||||
const offset = treeRowHighlightedIndex * lineHeight;
|
||||
if (scrollTop > offset - 20) {
|
||||
$(outputContainerScroll).animate({ scrollTop: offset - 20 }, 150);
|
||||
} else if (scrollTop < offset + lineHeight + 40 - containerHeight) {
|
||||
$(outputContainerScroll).animate(
|
||||
{ scrollTop: offset - containerHeight + 40 },
|
||||
150,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleCreateIssue() {
|
||||
const queryText = codeEditor.getValue();
|
||||
const outputText = outputContainer.innerText;
|
||||
const title = `Error parsing SQL`;
|
||||
const body = `Error when parsing the following SQL:
|
||||
\`\`\`
|
||||
${queryText}
|
||||
\`\`\`
|
||||
Error:
|
||||
\`\`\`
|
||||
${outputText}
|
||||
\`\`\``;
|
||||
const queryParams = `title=${encodeURIComponent(
|
||||
title,
|
||||
)}&body=${encodeURIComponent(body)}`;
|
||||
const url = `https://github.com/m-novikov/tree-sitter-sql/issues/new?${queryParams}`;
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
function handleTreeClick(event) {
|
||||
if (event.target.tagName === "A") {
|
||||
event.preventDefault();
|
||||
const [startRow, startColumn, endRow, endColumn] =
|
||||
event.target.dataset.range.split(",").map(n => parseInt(n));
|
||||
codeEditor.focus();
|
||||
codeEditor.setSelection(
|
||||
{ line: startRow, ch: startColumn },
|
||||
{ line: endRow, ch: endColumn },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function handleLoggingChange() {
|
||||
if (loggingCheckbox.checked) {
|
||||
parser.setLogger((message, lexing) => {
|
||||
if (lexing) {
|
||||
console.log(" ", message);
|
||||
} else {
|
||||
console.log(message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
parser.setLogger(null);
|
||||
}
|
||||
}
|
||||
|
||||
function handleQueryEnableChange() {
|
||||
if (queryCheckbox.checked) {
|
||||
queryContainer.style.visibility = "";
|
||||
queryContainer.style.position = "";
|
||||
} else {
|
||||
queryContainer.style.visibility = "hidden";
|
||||
queryContainer.style.position = "absolute";
|
||||
}
|
||||
handleQueryChange();
|
||||
}
|
||||
|
||||
function treeEditForEditorChange(change) {
|
||||
const oldLineCount = change.removed.length;
|
||||
const newLineCount = change.text.length;
|
||||
const lastLineLength = change.text[newLineCount - 1].length;
|
||||
|
||||
const startPosition = { row: change.from.line, column: change.from.ch };
|
||||
const oldEndPosition = { row: change.to.line, column: change.to.ch };
|
||||
const newEndPosition = {
|
||||
row: startPosition.row + newLineCount - 1,
|
||||
column:
|
||||
newLineCount === 1
|
||||
? startPosition.column + lastLineLength
|
||||
: lastLineLength,
|
||||
};
|
||||
|
||||
const startIndex = codeEditor.indexFromPos(change.from);
|
||||
let newEndIndex = startIndex + newLineCount - 1;
|
||||
let oldEndIndex = startIndex + oldLineCount - 1;
|
||||
for (let i = 0; i < newLineCount; i++) newEndIndex += change.text[i].length;
|
||||
for (let i = 0; i < oldLineCount; i++)
|
||||
oldEndIndex += change.removed[i].length;
|
||||
|
||||
return {
|
||||
startIndex,
|
||||
oldEndIndex,
|
||||
newEndIndex,
|
||||
startPosition,
|
||||
oldEndPosition,
|
||||
newEndPosition,
|
||||
};
|
||||
}
|
||||
|
||||
function colorForCaptureName(capture) {
|
||||
const id = query.captureNames.indexOf(capture);
|
||||
return COLORS_BY_INDEX[id % COLORS_BY_INDEX.length];
|
||||
}
|
||||
|
||||
function storageGetItem(lookupKey) {
|
||||
try {
|
||||
return localStorage.getItem(lookupKey);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function storageSetItem(lookupKey, value) {
|
||||
try {
|
||||
return localStorage.setIem(lookupKey, value);
|
||||
} catch {}
|
||||
}
|
||||
|
||||
function loadState() {
|
||||
const language = storageGetItem("language");
|
||||
const sourceCode = storageGetItem("sourceCode");
|
||||
const query = storageGetItem("query");
|
||||
const queryEnabled = storageGetItem("queryEnabled");
|
||||
if (language != null && sourceCode != null && query != null) {
|
||||
queryInput.value = query;
|
||||
codeInput.value = sourceCode;
|
||||
queryCheckbox.checked = queryEnabled === "true";
|
||||
}
|
||||
}
|
||||
|
||||
function saveState() {
|
||||
storageSetItem("sourceCode", codeEditor.getValue());
|
||||
saveQueryState();
|
||||
}
|
||||
|
||||
function saveQueryState() {
|
||||
storageSetItem("queryEnabled", queryCheckbox.checked);
|
||||
storageSetItem("query", queryEditor.getValue());
|
||||
}
|
||||
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function () {
|
||||
var context = this,
|
||||
args = arguments;
|
||||
var later = function () {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
};
|
||||
var callNow = immediate && !timeout;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
if (callNow) func.apply(context, args);
|
||||
};
|
||||
}
|
||||
})();
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
CREATE FUNCTION add(integer, integer) RETURNS integer
|
||||
AS 'select $1 + $2;'
|
||||
LANGUAGE SQL;
|
||||
@ -0,0 +1,19 @@
|
||||
pgAdmin 4
|
||||
|
||||
Copyright (C) 2013 - 2022, The pgAdmin Development Team
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement is
|
||||
hereby granted, provided that the above copyright notice and this paragraph and
|
||||
the following two paragraphs appear in all copies.
|
||||
|
||||
IN NO EVENT SHALL THE PGADMIN DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR
|
||||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
|
||||
PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE PGADMIN DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
@ -0,0 +1,24 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO postgres;
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET application_name='appname'
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
IS 'Some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer) TO PUBLIC;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,18 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,23 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname2'
|
||||
SET search_path=public, pg_catalog
|
||||
SET array_nulls='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,26 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF event_trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,17 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,27 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,15 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,24 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO postgres;
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET application_name='appname'
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
IS 'Some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer) TO PUBLIC;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,18 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,23 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname2'
|
||||
SET search_path=public, pg_catalog
|
||||
SET array_nulls='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,26 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF event_trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,17 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,27 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,15 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,20 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer) TO PUBLIC;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,17 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,18 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,14 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
ALTER PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,26 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO postgres;
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET application_name='appname'
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
IS 'Some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,23 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname2'
|
||||
SET search_path=public, pg_catalog
|
||||
SET array_nulls='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,26 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF event_trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE WINDOW
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,17 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,27 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,24 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO postgres;
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET application_name='appname'
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,21 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"() TO PUBLIC;
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
IS 'Some comment';
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '2';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function3_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function3_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function3_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
STABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,22 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,23 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 123
|
||||
IMMUTABLE LEAKPROOF STRICT SECURITY DEFINER
|
||||
SET application_name='appname2'
|
||||
SET search_path=public, pg_catalog
|
||||
SET array_nulls='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,26 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF event_trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
@ -0,0 +1,20 @@
|
||||
-- FUNCTION: public.Function1_$%{}[]()&*^!@"'`\/#(character varying)
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function1_$%{}[]()&*^!@""'`\/#"(character varying);
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(
|
||||
param character varying DEFAULT '1'::character varying)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function1_$%{}[]()&*^!@""'`\/#"(character varying)
|
||||
OWNER TO postgres;
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- FUNCTION: public.Function2_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Function2_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"(
|
||||
)
|
||||
RETURNS character varying
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE PARALLEL UNSAFE
|
||||
SET enable_sort='true'
|
||||
AS $BODY$
|
||||
begin
|
||||
select '1';
|
||||
end
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Function2_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,17 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 100
|
||||
VOLATILE NOT LEAKPROOF
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
@ -0,0 +1,27 @@
|
||||
-- FUNCTION: public.Trig1_$%{}[]()&*^!@"'`\/#()
|
||||
|
||||
-- DROP FUNCTION IF EXISTS public."Trig1_$%{}[]()&*^!@""'`\/#"();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
RETURNS SETOF trigger
|
||||
LANGUAGE 'plpgsql'
|
||||
COST 1234
|
||||
VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW
|
||||
ROWS 4321
|
||||
SET application_name='appname'
|
||||
SET search_path=public, pg_temp
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
ALTER FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
OWNER TO postgres;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() TO postgres WITH GRANT OPTION;
|
||||
|
||||
REVOKE ALL ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() FROM PUBLIC;
|
||||
|
||||
COMMENT ON FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"()
|
||||
IS 'some comment';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue