Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f881542834 | ||
|
|
e64d6edc73 | ||
|
|
b10378fe70 | ||
|
|
80b05973c6 | ||
|
|
426d9d5872 | ||
|
|
110a51c5b2 | ||
|
|
aa668856f7 | ||
|
|
d923dcf98b | ||
|
|
6e7759f1d5 | ||
|
|
2acd2a5615 | ||
|
|
f5a6df4ddb | ||
|
|
da553eec9b | ||
|
|
9a69d27009 | ||
|
|
83170a0e94 | ||
|
|
6d8c53bffd | ||
|
|
7944e75695 | ||
|
|
31653aef70 | ||
|
|
6a931588aa | ||
|
|
b4a754bdc0 | ||
|
|
199844e82c | ||
|
|
db06dd0275 | ||
|
|
72505b27cb | ||
|
|
9f26e7ed20 | ||
|
|
8e4e8b3e5a | ||
|
|
9eff2e9926 | ||
|
|
1c2ba72f02 | ||
|
|
5e54f20578 | ||
|
|
2d4429fa64 | ||
|
|
85baa22ca1 | ||
|
|
4690700a24 | ||
|
|
4745ad56e9 | ||
|
|
04357b7a55 | ||
|
|
a0f6e5272a | ||
|
|
eeeb350ed2 | ||
|
|
a68f0702e2 | ||
|
|
60a6c501fb | ||
|
|
5ff3f40116 | ||
|
|
662266a367 | ||
|
|
bc91a7c7b2 | ||
|
|
0ca65d7cfe | ||
|
|
47f26cc377 | ||
|
|
e0c53e7d1d | ||
|
|
d6da1cf25c | ||
|
|
fc4bef56a0 | ||
|
|
028473eb83 | ||
|
|
ac298b03c0 | ||
|
|
06ad6b8ba8 | ||
|
|
dbbbb2e5ed | ||
|
|
28b741a13a | ||
|
|
1ddc9cc889 | ||
|
|
53ab4d7e8d | ||
|
|
f8f7d5ac6f | ||
|
|
5887fb3815 | ||
|
|
234efc3be7 | ||
|
|
25f85fe123 | ||
|
|
3dadb8989b | ||
|
|
232fe286ee | ||
|
|
6192c48ef9 | ||
|
|
92aabb215f | ||
|
|
c76b30e353 | ||
|
|
1795141aec | ||
|
|
9f455a514e | ||
|
|
7090c02014 | ||
|
|
dc64ce331a | ||
|
|
094e5577e8 | ||
|
|
41e2a674e3 | ||
|
|
bdff046c57 | ||
|
|
5c8aefc01e | ||
|
|
ed76787b76 | ||
|
|
f3e4721a90 | ||
|
|
0d6f07a035 | ||
|
|
624f229ce7 | ||
|
|
3155380621 | ||
|
|
663e8382f3 | ||
|
|
659d0b8436 | ||
|
|
24f9f65b1b | ||
|
|
177def1e58 | ||
|
|
3f541200d9 | ||
|
|
687204771c | ||
|
|
4403f326e9 | ||
|
|
35bbee3023 | ||
|
|
a51de78292 | ||
|
|
a850e7bd5a | ||
|
|
b618dfe286 | ||
|
|
99b51f8f20 | ||
|
|
bfca1e3ac8 | ||
|
|
7f667f5761 | ||
|
|
1281f5cd6c | ||
|
|
350ffcce7c | ||
|
|
8331f62e1c | ||
|
|
c29275011a | ||
|
|
7f53e13aa7 | ||
|
|
d1530015ee | ||
|
|
228d3dde5b | ||
|
|
3a5464b278 | ||
|
|
b9d5e08e8f | ||
|
|
4067d65a30 | ||
|
|
ee2099d9c6 | ||
|
|
bfb05d3f9f | ||
|
|
9cdb3b40ab | ||
|
|
6800b1f723 | ||
|
|
db7a2e3023 | ||
|
|
ee8fec6d7f | ||
|
|
f8afe2ef94 | ||
|
|
efbad77dbe | ||
|
|
b5c8c85c90 | ||
|
|
d7ee4bb932 | ||
|
|
8780462708 | ||
|
|
99a8b70e00 | ||
|
|
0cfd76c279 | ||
|
|
537c27a58e | ||
|
|
aab5fadc01 | ||
|
|
97e39699ea | ||
|
|
76e658ee12 | ||
|
|
7b65507533 | ||
|
|
cbe40176c1 | ||
|
|
bcb1392a1a | ||
|
|
9a8a28e4f9 | ||
|
|
1ff007d1cb | ||
|
|
3cb02bcdc3 | ||
|
|
82d209946f | ||
|
|
2ef3080d0e | ||
|
|
5b322d94e8 | ||
|
|
adb5cd34bf | ||
|
|
108af5c10b | ||
|
|
136bb412a1 | ||
|
|
8cfe39e837 | ||
|
|
ec968dbc14 |
No files matched your search
@@ -43,3 +43,5 @@ web/pgAdmin/static/js/generated
|
||||
web/pgadmin/static/js/generated
|
||||
web/yarn-error.log
|
||||
/web/cacert.pem
|
||||
auditjs.html
|
||||
auditpy.txt
|
||||
@@ -0,0 +1,174 @@
|
||||
########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
#########################################################################
|
||||
# Create a Node container which will be used to build the JS components
|
||||
# and clean up the web/ source code
|
||||
#########################################################################
|
||||
|
||||
FROM node:8-alpine AS app-builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
g++ \
|
||||
libc6-compat \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
make \
|
||||
nasm \
|
||||
git \
|
||||
zlib-dev
|
||||
|
||||
# Create the /pgadmin4 directory and copy the source into it. Explicitly
|
||||
# remove the node_modules directory as we'll recreate a clean version, as well
|
||||
# as various other files we don't want
|
||||
COPY web /pgadmin4/web
|
||||
RUN rm -rf /pgadmin4/web/*.log \
|
||||
/pgadmin4/web/config_*.py \
|
||||
/pgadmin4/web/node_modules \
|
||||
/pgadmin4/web/regression \
|
||||
`find /pgadmin4/web -type d -name tests` \
|
||||
`find /pgadmin4/web -type f -name .DS_Store`
|
||||
|
||||
WORKDIR /pgadmin4/web
|
||||
|
||||
# Build the JS vendor code in the app-builder, and then remove the vendor source.
|
||||
RUN npm install && \
|
||||
npm audit fix && \
|
||||
rm -f yarn.lock && \
|
||||
yarn import && \
|
||||
yarn audit && \
|
||||
rm -f package-lock.json && \
|
||||
yarn run bundle && \
|
||||
rm -rf node_modules \
|
||||
yarn.lock \
|
||||
package.json \
|
||||
.[^.]* \
|
||||
babel.cfg \
|
||||
webpack.* \
|
||||
karma.conf.js \
|
||||
./pgadmin/static/js/generated/.cache
|
||||
|
||||
#########################################################################
|
||||
# Now, create a documentation build container for the Sphinx docs
|
||||
#########################################################################
|
||||
|
||||
FROM python:3.7-alpine3.10 as docs-builder
|
||||
|
||||
# Install only dependencies absolutely required for documentation building
|
||||
RUN apk add --no-cache \
|
||||
make \
|
||||
build-base \
|
||||
openssl-dev \
|
||||
libffi-dev && \
|
||||
pip install --no-cache-dir \
|
||||
sphinx \
|
||||
flask_security \
|
||||
flask_paranoid \
|
||||
python-dateutil \
|
||||
flask_sqlalchemy \
|
||||
flask_gravatar \
|
||||
flask_migrate \
|
||||
simplejson \
|
||||
cryptography
|
||||
|
||||
# Copy the docs from the local tree. Explicitly remove any existing builds that
|
||||
# may be present
|
||||
COPY docs /pgadmin4/docs
|
||||
COPY web /pgadmin4/web
|
||||
RUN rm -rf /pgadmin4/docs/en_US/_build
|
||||
|
||||
# Build the docs
|
||||
RUN LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C /pgadmin4/docs/en_US -f Makefile.sphinx html
|
||||
|
||||
#########################################################################
|
||||
# Create additional builders to get all of the PostgreSQL utilities
|
||||
#########################################################################
|
||||
|
||||
FROM postgres:9.4-alpine as pg94-builder
|
||||
FROM postgres:9.5-alpine as pg95-builder
|
||||
FROM postgres:9.6-alpine as pg96-builder
|
||||
FROM postgres:10-alpine as pg10-builder
|
||||
FROM postgres:11-alpine as pg11-builder
|
||||
|
||||
FROM alpine:3.10 as tool-builder
|
||||
|
||||
# Copy the PG binaries
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.4/
|
||||
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.5/
|
||||
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-9.6/
|
||||
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-10/
|
||||
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-11/
|
||||
|
||||
#########################################################################
|
||||
# Assemble everything into the final container.
|
||||
#########################################################################
|
||||
|
||||
FROM python:3.7-alpine3.10
|
||||
|
||||
COPY --from=tool-builder /usr/local/pgsql /usr/local/
|
||||
|
||||
WORKDIR /pgadmin4
|
||||
ENV PYTHONPATH=/pgadmin4
|
||||
|
||||
# Copy in the code and docs
|
||||
COPY --from=app-builder /pgadmin4/web /pgadmin4
|
||||
COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs
|
||||
COPY requirements.txt /pgadmin4/requirements.txt
|
||||
|
||||
# Install build-dependencies, build & install C extensions and purge deps in
|
||||
# one RUN step
|
||||
RUN apk add --no-cache --virtual \
|
||||
build-deps \
|
||||
build-base \
|
||||
postgresql-dev \
|
||||
libffi-dev \
|
||||
linux-headers && \
|
||||
apk add \
|
||||
postfix \
|
||||
postgresql-client \
|
||||
postgresql-libs && \
|
||||
pip install --upgrade pip && \
|
||||
pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir gunicorn && \
|
||||
apk del --no-cache build-deps
|
||||
|
||||
# Copy the runner script
|
||||
COPY pkg/docker/run_pgadmin.py /pgadmin4
|
||||
COPY pkg/docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Precompile and optimize python code to save time and space on startup
|
||||
RUN python -O -m compileall -x node_modules /pgadmin4
|
||||
|
||||
# Finish up
|
||||
VOLUME /var/lib/pgadmin
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -280,8 +280,15 @@ REM Main build sequence Ends
|
||||
|
||||
ECHO Staging PostgreSQL components...
|
||||
COPY "%PGDIR%\bin\libpq.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\libcrypto-1_1.dll" (
|
||||
REM OpenSSL 1.1.1
|
||||
COPY "%PGDIR%\bin\libcrypto-1_1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\libssl-1_1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
) ELSE (
|
||||
REM OpenSSL 1.0.2
|
||||
COPY "%PGDIR%\bin\ssleay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
COPY "%PGDIR%\bin\libeay32.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
)
|
||||
IF EXIST "%PGDIR%\bin\libintl-*.dll" COPY "%PGDIR%\bin\libintl-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\libiconv-*.dll" COPY "%PGDIR%\bin\libiconv-*.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
IF EXIST "%PGDIR%\bin\zlib.dll" COPY "%PGDIR%\bin\zlib.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
|
||||
|
||||
@@ -20,7 +20,13 @@ appbundle: docs
|
||||
./pkg/mac/build.sh
|
||||
|
||||
install-node:
|
||||
cd web && yarn install
|
||||
cd web && npm install
|
||||
cd web && npm audit fix
|
||||
rm -f web/yarn.lock
|
||||
cd web && yarn import
|
||||
cd web && yarn audit
|
||||
rm -f package-lock.json
|
||||
rm -f web/package-lock.json
|
||||
|
||||
bundle:
|
||||
cd web && yarn run bundle
|
||||
@@ -34,6 +40,18 @@ linter:
|
||||
check: install-node bundle linter check-pep8
|
||||
cd web && yarn run karma start --single-run && python regression/runtests.py
|
||||
|
||||
check-audit:
|
||||
cd web && yarn run audit
|
||||
|
||||
check-auditjs:
|
||||
cd web && yarn run auditjs
|
||||
|
||||
check-auditjs-html:
|
||||
cd web && yarn run auditjs-html
|
||||
|
||||
check-auditpy:
|
||||
cd web && yarn run auditpy
|
||||
|
||||
check-pep8:
|
||||
pycodestyle --config=.pycodestyle docs/
|
||||
pycodestyle --config=.pycodestyle pkg/
|
||||
@@ -59,7 +77,7 @@ runtime:
|
||||
cd runtime && qmake CONFIG+=release && make
|
||||
|
||||
# Include all clean sub-targets in clean
|
||||
clean: clean-appbundle clean-docker clean-dist clean-docs clean-node clean-pip clean-src clean-runtime
|
||||
clean: clean-appbundle clean-dist clean-docs clean-node clean-pip clean-src clean-runtime
|
||||
rm -rf web/pgadmin/static/js/generated/*
|
||||
rm -rf web/pgadmin/static/js/generated/.cache
|
||||
rm -rf web/pgadmin/static/css/generated/*
|
||||
@@ -72,9 +90,6 @@ clean-runtime:
|
||||
clean-appbundle:
|
||||
rm -rf mac-build/
|
||||
|
||||
clean-docker:
|
||||
rm -rf docker-build/
|
||||
|
||||
clean-dist:
|
||||
rm -rf dist/
|
||||
|
||||
@@ -91,7 +106,7 @@ clean-src:
|
||||
rm -rf src-build/
|
||||
|
||||
docker:
|
||||
./pkg/docker/build.sh
|
||||
docker build `python -c 'import web.config as c; print("-t {0} -t {0}:latest -t {0}:{1} -t {0}:{1}.{2}".format(c.APP_NAME.replace(" ", "").lower(), c.APP_RELEASE, c.APP_REVISION))'` .
|
||||
|
||||
docs:
|
||||
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
|
||||
|
||||
@@ -39,9 +39,69 @@ are disabled if inapplicable.)
|
||||
a text value.
|
||||
* Use the drop-down listbox next to *Collation* to apply a collation setting to
|
||||
the column.
|
||||
|
||||
Click the *Constraints* tab to continue.
|
||||
|
||||
.. image:: images/column_constraints.png
|
||||
:alt: Column dialog constraints tab
|
||||
:align: center
|
||||
|
||||
Use the fields in the *Constraints* tab to specify constraints for the column.
|
||||
(Fields are disabled if inapplicable.)
|
||||
|
||||
* Use the *Default Value* field to specify a default data value.
|
||||
* Move the *Not Null* switch to the *Yes* position to specify the column may not
|
||||
contain null values. The default is *No*.
|
||||
* Use the *Type* field to specify the column type (NONE/IDENTITY/GENERATED).
|
||||
The default is *NONE*.
|
||||
|
||||
Click the *IDENTITY* type to create Identity column.
|
||||
|
||||
.. image:: images/column_constraint_identity.png
|
||||
:alt: Column dialog constraints tab
|
||||
:align: center
|
||||
|
||||
Use the following fields to create *IDENTITY* column. Identity columns are
|
||||
applicable for PG/EPAS version 10 and above.
|
||||
|
||||
* Use the *Identity* field to specify ALWAYS or BY DEFAULT. This clause is
|
||||
used to determine how the sequence value is given precedence over a
|
||||
user-specified value in an INSERT statement.
|
||||
* Use the *Increment* field to specify which value is added to the current
|
||||
sequence value to create a new value.
|
||||
* Provide a value in the *Start* field to specify the beginning value of the
|
||||
sequence. The default starting value is MINVALUE for ascending sequences and
|
||||
MAXVALUE for descending ones.
|
||||
* Provide a value in the *Minimum* field to specify the minimum value a sequence
|
||||
can generate. If this clause is not supplied or NO MINVALUE is specified,
|
||||
then defaults will be used. The defaults are 1 and -263-1 for ascending and
|
||||
descending sequences, respectively.
|
||||
* Provide a value in the *Maximum* field to specify the maximum value for the
|
||||
sequence. If this clause is not supplied or NO MAXVALUE is specified, then
|
||||
default values will be used. The defaults are 263-1 and -1 for ascending and
|
||||
descending sequences, respectively.
|
||||
* Provide a value in the *Cache* field to specify how many sequence numbers are
|
||||
to be preallocated and stored in memory for faster access. The minimum value
|
||||
is 1 (only one value can be generated at a time, i.e., no cache), and this is
|
||||
also the default.
|
||||
* Move the *Cycled* switch to the *Yes* position to allow the sequence to wrap
|
||||
around when the MAXVALUE or the MINVALUE has been reached by an ascending or
|
||||
descending sequence respectively. If the limit is reached, the next number
|
||||
generated will be the MINVALUE or MAXVALUE, respectively. The default is *No*.
|
||||
|
||||
Click the *GENERATED* type to create Generated column.
|
||||
|
||||
.. image:: images/column_constraint_generated.png
|
||||
:alt: Column dialog constraints tab
|
||||
:align: center
|
||||
|
||||
Use the following fields to create *GENERATED* column. Generated columns are
|
||||
applicable for PG/EPAS version 12 and above.
|
||||
|
||||
* Use the *Expression* field to specify the generation expression. It can
|
||||
refer to other columns in the table, but not other generated columns.
|
||||
Any functions and operators used must be immutable. References to other
|
||||
tables are not allowed.
|
||||
|
||||
Click the *Variables* tab to continue.
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
.. _compound_trigger_dialog:
|
||||
|
||||
********************************
|
||||
`Compound Trigger Dialog`:index:
|
||||
********************************
|
||||
|
||||
Use the *Compound Trigger* dialog to create a compound trigger or modify an
|
||||
existing compound trigger. *Compound Trigger* is supported only for EPAS server
|
||||
12 and above. A compound trigger executes a specified code when certain events
|
||||
occur.
|
||||
|
||||
The *Compound Trigger* dialog organizes the development of a compound trigger
|
||||
through the following dialog tabs: *General*, *Events*, and *Code*. The *SQL*
|
||||
tab displays the SQL code generated by dialog selections.
|
||||
|
||||
.. image:: images/compound_trigger_general.png
|
||||
:alt: Compound Trigger dialog general tab
|
||||
:align: center
|
||||
|
||||
Use the fields in the *General* tab to identify the compound trigger:
|
||||
|
||||
* Use the *Name* field to add a descriptive name for the compound trigger. This
|
||||
must be distinct from the name of any other compound trigger for the same table.
|
||||
The name will be displayed in the *pgAdmin* tree control.
|
||||
* Store notes about the compound trigger in the *Comment* field.
|
||||
|
||||
Click the *Events* tab to continue.
|
||||
|
||||
.. image:: images/compound_trigger_events.png
|
||||
:alt: Compound Trigger dialog events tab
|
||||
:align: center
|
||||
|
||||
Use the fields in the *Events* tab to specify how and when the compound trigger fires:
|
||||
|
||||
* Select the type of event(s) that will invoke the compound trigger; to select
|
||||
an event type, move the switch next to the event to the *YES* position.
|
||||
The supported event types are *INSERT*, *UPDATE*, *DELETE* and *TRUNCATE*.
|
||||
Views cannot have TRUNCATE triggers.
|
||||
* Use the *When* field to provide a boolean condition that will invoke the
|
||||
compound trigger.
|
||||
* If defining a column-specific compound trigger, use the *Columns* field to
|
||||
specify the columns or columns that are the target of the compound trigger.
|
||||
|
||||
Click the *Code* tab to continue.
|
||||
|
||||
.. image:: images/compound_trigger_code.png
|
||||
:alt: Compound Trigger dialog code tab
|
||||
:align: center
|
||||
|
||||
Use the *Code* field to specify the code for the five timing events
|
||||
*BEFORE STATEMENT*, *AFTER STATEMENT*, *BEFORE EACH ROW*, *AFTER EACH ROW*,
|
||||
*INSTEAD OF EACH ROW* that will be invoked when the compound trigger fires.
|
||||
Basic template is provided with place holders.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
Your entries in the *Compound Trigger* dialog generate a SQL command (see an example
|
||||
below). Use the *SQL* tab for review; revisit or switch tabs to make any changes
|
||||
to the SQL command.
|
||||
|
||||
Example
|
||||
*******
|
||||
|
||||
The following is an example of the sql command generated by user selections in
|
||||
the *Compound Trigger* dialog:
|
||||
|
||||
.. image:: images/compound_trigger_sql.png
|
||||
:alt: Compound Trigger dialog sql tab
|
||||
:align: center
|
||||
|
||||
The example demonstrates creating a compound trigger named *test_ct*.
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
* Click the *Reset* button to restore configuration parameters.
|
||||
@@ -0,0 +1,34 @@
|
||||
.. _config_py:
|
||||
|
||||
***************************
|
||||
`The config.py File`:index:
|
||||
***************************
|
||||
|
||||
There are multiple configuration files that are read at startup by pgAdmin. These
|
||||
are as follows:
|
||||
|
||||
* ``config.py``: This is the main configuration file, and should not be modified.
|
||||
It can be used as a reference for configuration settings, that may be overridden
|
||||
in one of the following files.
|
||||
|
||||
* ``config_distro.py``: This file is read after ``config.py`` and is intended for
|
||||
packagers to change any settings that are required for their pgAdmin distribution.
|
||||
This may typically include certain paths and file locations. This file is optional,
|
||||
and may be created by packagers in the same directory as ``config.py`` if
|
||||
needed.
|
||||
|
||||
* ``config_local.py``: This file is read after ``config_distro.py`` and is intended
|
||||
for end users to change any default or packaging specific settings that they may
|
||||
wish to adjust to meet local preferences or standards.This file is optional,
|
||||
and may be created by users in the same directory as ``config.py`` if
|
||||
needed.
|
||||
|
||||
.. note:: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
|
||||
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
|
||||
and STORAGE_DIR values as well as they will have been set based on the default
|
||||
configuration or overridden by the runtime.
|
||||
|
||||
The default ``config.py`` file is shown below for reference:
|
||||
|
||||
.. literalinclude:: ../../web/config.py
|
||||
:language: python
|
||||
@@ -31,19 +31,19 @@ Environment Variables
|
||||
|
||||
The container will accept the following variables at startup:
|
||||
|
||||
*PGADMIN_DEFAULT_EMAIL*
|
||||
**PGADMIN_DEFAULT_EMAIL**
|
||||
|
||||
This is the email address used when setting up the initial administrator account
|
||||
to login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_DEFAULT_PASSWORD*
|
||||
**PGADMIN_DEFAULT_PASSWORD**
|
||||
|
||||
This is the password used when setting up the initial administrator account to
|
||||
login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_ENABLE_TLS*
|
||||
**PGADMIN_ENABLE_TLS**
|
||||
|
||||
Default: <null>
|
||||
*Default: <null>*
|
||||
|
||||
If left un-set, the container will listen on port 80 for connections in plain
|
||||
text. If set to any value, the container will listen on port 443 for TLS
|
||||
@@ -53,36 +53,51 @@ When TLS is enabled, a certificate and key must be provided. Typically these
|
||||
should be stored on the host file system and mounted from the container. The
|
||||
expected paths are /certs/server.crt and /certs/server.key
|
||||
|
||||
*PGADMIN_LISTEN_ADDRESS*
|
||||
**PGADMIN_LISTEN_ADDRESS**
|
||||
|
||||
Default: [::]
|
||||
*Default: [::]*
|
||||
|
||||
Specify the local address that the servers listens on. The default should work
|
||||
for most users - in IPv4-only environments, this may need to be set to
|
||||
127.0.0.1.
|
||||
|
||||
*PGADMIN_LISTEN_PORT*
|
||||
**PGADMIN_LISTEN_PORT**
|
||||
|
||||
Default: 80 or 443 (if TLS is enabled)
|
||||
*Default: 80 or 443 (if TLS is enabled)*
|
||||
|
||||
Allows the port that the server listens on to be set to a specific value rather
|
||||
than using the default.
|
||||
|
||||
*PGADMIN_SERVER_JSON_FILE*
|
||||
**PGADMIN_SERVER_JSON_FILE**
|
||||
|
||||
Default: /pgadmin4/servers.json
|
||||
*Default: /pgadmin4/servers.json*
|
||||
|
||||
Override the default file path for the server definition list. See the
|
||||
/pgadmin4/servers.json mapped file below for more information.
|
||||
|
||||
*GUNICORN_THREADS*
|
||||
**GUNICORN_THREADS**
|
||||
|
||||
Default: 25
|
||||
*Default: 25*
|
||||
|
||||
Adjust the number of threads the Gunicorn server uses to handle incoming
|
||||
requests. This should typically be left as-is, except in highly loaded systems
|
||||
where it may be increased.
|
||||
|
||||
**PGADMIN_CONFIG_**
|
||||
|
||||
This is a variable prefix that can be used to override any of the configuration
|
||||
options in pgAdmin's *config.py* file. Add the *PGADMIN_CONFIG_* prefix to any
|
||||
variable name from *config.py* and give the value in the format 'string value'
|
||||
for strings, True/False for booleans or 123 for numbers. See below for an
|
||||
example.
|
||||
|
||||
Settings are written to */pgadmin4/config_distro.py* within the container, which
|
||||
is read after */pgadmin4/config.py* and before */pgadmin4/config_local.py*.
|
||||
Any settings given will therefore override anything in config.py, but can be
|
||||
overridden by settings in config_local.py.
|
||||
|
||||
See :ref:`config_py` for more information on the available configuration settings.
|
||||
|
||||
Mapped Files and Directories
|
||||
****************************
|
||||
|
||||
@@ -90,20 +105,21 @@ The following files or directories can be mapped from the container onto the
|
||||
host machine to allow configuration to be customised and shared between
|
||||
instances:
|
||||
|
||||
*/var/lib/pgadmin*
|
||||
**/var/lib/pgadmin**
|
||||
|
||||
This is the working directory in which pgAdmin stores session data, user files,
|
||||
configuration files, and it's configuration database. Mapping this directory
|
||||
onto the host machine gives you an easy way to maintain configuration between
|
||||
invocations of the container.
|
||||
|
||||
*/pgadmin4/config_local.py*
|
||||
**/pgadmin4/config_local.py**
|
||||
|
||||
This file can be used to override configuration settings in pgAdmin. Settings
|
||||
found in config.py can be overridden with deployment specific values if
|
||||
required.
|
||||
required. Settings in config_local.py will also override anything specified in
|
||||
the container environment through *PGADMIN_CONFIG_* prefixed variables.
|
||||
|
||||
*/pgadmin4/servers.json*
|
||||
**/pgadmin4/servers.json**
|
||||
|
||||
If this file is mapped, server definitions found in it will be loaded at launch
|
||||
time. This allows connection information to be pre-loaded into the instance of
|
||||
@@ -111,11 +127,11 @@ pgAdmin in the container. Note that server definitions are only loaded on first
|
||||
launch, i.e. when the configuration database is created, and not on subsequent
|
||||
launches using the same configuration database.
|
||||
|
||||
*/certs/server.cert*
|
||||
**/certs/server.cert**
|
||||
|
||||
If TLS is enabled, this file will be used as the servers TLS certificate.
|
||||
|
||||
*/certs/server.key*
|
||||
**/certs/server.key**
|
||||
|
||||
If TLS is enabled, this file will be used as the key file for the servers TLS
|
||||
certificate.
|
||||
@@ -129,8 +145,21 @@ Run a simple container over port 80:
|
||||
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 80:80 \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
|
||||
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
|
||||
-d dpage/pgadmin4
|
||||
|
||||
Run a simple container over port 80, setting some configuration options:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 80:80 \
|
||||
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
|
||||
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
|
||||
-e 'PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True' \
|
||||
-e 'PGADMIN_CONFIG_LOGIN_BANNER="Authorised users only!"' \
|
||||
-e 'PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=10' \
|
||||
-d dpage/pgadmin4
|
||||
|
||||
Run a TLS secured container using a shared config/storage directory in
|
||||
@@ -141,13 +170,13 @@ Run a TLS secured container using a shared config/storage directory in
|
||||
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 443:443 \
|
||||
-v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
|
||||
-v "/path/to/certificate.cert:/certs/server.cert" \
|
||||
-v "/path/to/certificate.key:/certs/server.key" \
|
||||
-v "/tmp/servers.json:/servers.json" \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-e "PGADMIN_ENABLE_TLS=True" \
|
||||
-v /private/var/lib/pgadmin:/var/lib/pgadmin \
|
||||
-v /path/to/certificate.cert:/certs/server.cert \
|
||||
-v /path/to/certificate.key:/certs/server.key \
|
||||
-v /tmp/servers.json:/servers.json \
|
||||
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
|
||||
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
|
||||
-e 'PGADMIN_ENABLE_TLS=True' \
|
||||
-d dpage/pgadmin4
|
||||
|
||||
Reverse Proxying
|
||||
|
||||
@@ -12,7 +12,8 @@ will provide detailed information about creating a custom deployment.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
config_py
|
||||
desktop_deployment
|
||||
server_deployment
|
||||
container_deployment
|
||||
container_deployment
|
||||
@@ -36,32 +36,10 @@ this is overridden by the desktop runtime at startup. In most environments, no
|
||||
Python configuration is required unless you wish to override other default
|
||||
settings.
|
||||
|
||||
There are multiple configuration files that are read at startup by pgAdmin. These
|
||||
are as follows:
|
||||
|
||||
* ``config.py``: This is the main configuration file, and should not be modified.
|
||||
It can be used as a reference for configuration settings, that may be overridden
|
||||
in one of the following files.
|
||||
|
||||
* ``config_distro.py``: This file is read after ``config.py`` and is intended for
|
||||
packagers to change any settings that are required for their pgAdmin distribution.
|
||||
This may typically include certain paths and file locations. This file is optional,
|
||||
and may be created by packagers in the same directory as ``config.py`` if
|
||||
needed.
|
||||
|
||||
* ``config_local.py``: This file is read after ``config_distro.py`` and is intended
|
||||
for end users to change any default or packaging specific settings that they may
|
||||
wish to adjust to meet local preferences or standards.This file is optional,
|
||||
and may be created by users in the same directory as ``config.py`` if
|
||||
needed.
|
||||
|
||||
.. note:: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
|
||||
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
|
||||
and STORAGE_DIR values as well as they will have been set based on the default
|
||||
configuration or overridden by the runtime.
|
||||
See :ref:`config_py` for more information on configuration settings.
|
||||
|
||||
Runtime
|
||||
-------
|
||||
*******
|
||||
|
||||
When executed, the runtime will automatically try to execute the pgAdmin Python
|
||||
application. If execution fails, it will prompt you to adjust the Python Path
|
||||
|
||||
@@ -35,6 +35,8 @@ disabled in either mode. Please see
|
||||
:ref:`The Query Tool Toolbar <query_tool_toolbar>` for a description of the
|
||||
available controls.
|
||||
|
||||
.. _data-grid:
|
||||
|
||||
The Data Grid
|
||||
*************
|
||||
|
||||
@@ -42,8 +44,6 @@ The top row of the data grid displays the name of each column, the data type,
|
||||
and if applicable, the number of characters allowed. A column that is part of
|
||||
the primary key will additionally be marked with [PK].
|
||||
|
||||
.. _modifying-data-grid:
|
||||
|
||||
To modify the displayed data:
|
||||
|
||||
* To change a numeric value within the grid, double-click the value to select
|
||||
|
||||
@@ -9,7 +9,7 @@ a function, the new function is not the same entity as the old; you must drop
|
||||
existing rules, views, triggers, etc. that refer to the old function.
|
||||
|
||||
The *Function* dialog organizes the development of a function through the
|
||||
following dialog tabs: *General*, *Definition*, *Options*, *Arguments*,
|
||||
following dialog tabs: *General*, *Definition*, *Code*, *Options*,
|
||||
*Parameters*, and *Security*. The *SQL* tab displays the SQL code generated by
|
||||
dialog selections.
|
||||
|
||||
@@ -39,6 +39,27 @@ Use the fields in the *Definition* tab to define the function:
|
||||
returned by the function, if any.
|
||||
* Use the drop-down listbox next to *Language* to select the implementation
|
||||
language. The default is *sql*.
|
||||
* Use the fields in the *Arguments* to define an argument. Click the *Add*
|
||||
icon (+) to set parameters and values for the argument:
|
||||
|
||||
* Use the drop-down listbox in the *Data type* field to select a data type.
|
||||
* Use the drop-down listbox in the *Mode* field to select a mode. Select *IN*
|
||||
for an input parameter; select *OUT* for an output parameter; select *INOUT*
|
||||
for both an input and an output parameter; or, select *VARIADIC* to specify a
|
||||
VARIADIC parameter.
|
||||
* Provide a name for the argument in the *Argument Name* field.
|
||||
* Specify a default value for the argument in the *Default Value* field.
|
||||
|
||||
Click the *Add* icon (+) to define another argument; to discard an argument,
|
||||
click the trash icon to the left of the row and confirm deletion in the *Delete
|
||||
Row* popup.
|
||||
|
||||
Click the *Code* tab to continue.
|
||||
|
||||
.. image:: images/function_code.png
|
||||
:alt: Function dialog code tab
|
||||
:align: center
|
||||
|
||||
* Use the *Code* field to write the code that will execute when the function
|
||||
is called.
|
||||
|
||||
@@ -87,27 +108,8 @@ function:
|
||||
The default assumption is 1000 rows.
|
||||
* Move the *Leak proof?* switch to indicate whether the function has side
|
||||
effects. The default is *No*. This option can only be set by the superuser.
|
||||
|
||||
Click the *Arguments* tab to continue.
|
||||
|
||||
.. image:: images/function_arguments.png
|
||||
:alt: Function dialog arguments tab
|
||||
:align: center
|
||||
|
||||
Use the fields in the *Arguments* tab to define an argument. Click the *Add*
|
||||
icon (+) to set parameters and values for the argument:
|
||||
|
||||
* Use the drop-down listbox in the *Data type* field to select a data type.
|
||||
* Use the drop-down listbox in the *Mode* field to select a mode. Select *IN*
|
||||
for an input parameter; select *OUT* for an output parameter; select *INOUT*
|
||||
for both an input and an output parameter; or, select *VARIADIC* to specify a
|
||||
VARIADIC parameter.
|
||||
* Provide a name for the argument in the *Argument Name* field.
|
||||
* Specify a default value for the argument in the *Default Value* field.
|
||||
|
||||
Click the *Add* icon (+) to define another argument; to discard an argument,
|
||||
click the trash icon to the left of the row and confirm deletion in the *Delete
|
||||
Row* popup.
|
||||
* Use the *Support function* field to specify a planner support function to
|
||||
use for the function.
|
||||
|
||||
Click the *Parameters* tab to continue.
|
||||
|
||||
@@ -175,9 +177,8 @@ the *Function* dialog:
|
||||
:alt: Function dialog sql tab
|
||||
:align: center
|
||||
|
||||
The example demonstrates creating an *edbspl* function named *emp_comp*. The
|
||||
function adds two columns (p_sal and p_comm), and then uses the result to
|
||||
compute a yearly salary, returning a NUMERIC value.
|
||||
The example demonstrates creating an *plpgsql* function named *hire_salesmen*. The
|
||||
function have three columns (p_ename, p_sal and p_comm).
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* Click the *Save* button to save work.
|
||||
|
||||
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 80 KiB |
@@ -17,6 +17,7 @@ node, and select *Create Cast...*
|
||||
|
||||
check_dialog
|
||||
column_dialog
|
||||
compound_trigger_dialog
|
||||
exclusion_constraint_dialog
|
||||
foreign_key_dialog
|
||||
index_dialog
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Use the *Package* dialog to create a (user-defined) package specification.
|
||||
|
||||
The *Package* dialog organizes the management of a package through the following
|
||||
dialog tabs: *General*, *Code*, and *Security*. The *SQL* tab displays the SQL
|
||||
dialog tabs: *General*, *Header*, *Body*, and *Security*. The *SQL* tab displays the SQL
|
||||
code generated by dialog selections.
|
||||
|
||||
.. image:: images/package_general.png
|
||||
@@ -22,17 +22,22 @@ Use the fields in the *General* tab to identify the package:
|
||||
in the *Schema* field.
|
||||
* Store notes about the package in the *Comment* field.
|
||||
|
||||
Click the *Code* tab to continue.
|
||||
Click the *Header* tab to continue.
|
||||
|
||||
.. image:: images/package_code.png
|
||||
:alt: Package dialog code tab
|
||||
.. image:: images/package_header.png
|
||||
:alt: Package dialog header tab
|
||||
:align: center
|
||||
|
||||
Use the fields in the *Code* tab to specify the package contents and to provide
|
||||
implementation details:
|
||||
Use the *Header* field to define the public interface for the package.
|
||||
|
||||
* Use the *Header* field to define the public interface for the package.
|
||||
* Use the *Body* field to provide the code that implements each package object.
|
||||
Click the *Body* tab to continue.
|
||||
|
||||
.. image:: images/package_body.png
|
||||
:alt: Package dialog body tab
|
||||
:align: center
|
||||
|
||||
|
||||
Use the *Body* field to provide the code that implements each package object.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
@@ -63,7 +68,7 @@ modifies a package definition:
|
||||
:align: center
|
||||
|
||||
The example shown demonstrates creating a package named *empinfo* that includes
|
||||
one function and one procedure.
|
||||
two function and two procedure.
|
||||
|
||||
* Click the *Save* button to save work.
|
||||
* Click the *Cancel* button to exit without saving work.
|
||||
|
||||
@@ -69,6 +69,9 @@ Use fields on the step definition dialog to define the step:
|
||||
* If you select *Batch*, use the *Code* tab to provide the batch script that
|
||||
will be executed during the step.
|
||||
|
||||
.. note:: The fields *Connection type*, *Database* and *Connection string* are only
|
||||
applicable when *SQL* is selected because *Batch* cannot be run on remote servers.
|
||||
|
||||
* Use the *Connection type* switch to indicate if the step is performed on a
|
||||
local server (*Local*) or on a remote host (*Remote*). If you specify a
|
||||
remote connection should be used for the step, the *Connection string* field
|
||||
|
||||
@@ -268,6 +268,37 @@ Tool display.
|
||||
a positive value above zero is specified, the notifier will be displayed for
|
||||
the specified number of seconds. The default is *5*.
|
||||
|
||||
.. image:: images/preferences_sql_editor.png
|
||||
:alt: Preferences dialog sqleditor editor settings
|
||||
:align: center
|
||||
|
||||
Use the fields on the *Editor* panel to change settings of the query editor.
|
||||
|
||||
* When the *Brace matching?* switch is set to *True*, the editor will highlight
|
||||
pairs of matched braces.
|
||||
|
||||
* When the *Code folding?* switch is set to *False*, the editor will disable
|
||||
code folding. Disabling will improve editor performance with large files.
|
||||
|
||||
* Use the *Font size* field to specify the font size that will be used in text
|
||||
boxes and editors.
|
||||
|
||||
* When the *Insert bracket pairs?* switch is set to *True*, the editor will
|
||||
automatically insert paired brackets.
|
||||
|
||||
* When the *Line wrapping* switch is set to *True*, the editor will implement
|
||||
line-wrapping behavior.
|
||||
|
||||
* When the *Plain text mode?* switch is set to *True*, the editor mode will be
|
||||
changed to text/plain. Keyword highlighting and code folding will be disabled.
|
||||
This will improve editor performance with large files.
|
||||
|
||||
* Use the *Tab size* field to specify the number of spaces per tab character in
|
||||
the editor.
|
||||
|
||||
* When the *Use spaces* switch is set to *True*, the editor will insert spaces
|
||||
(instead of tab characters) when the tab key or auto-indent are used.
|
||||
|
||||
.. image:: images/preferences_sql_explain.png
|
||||
:alt: Preferences dialog sqleditor explain options
|
||||
:align: center
|
||||
@@ -300,18 +331,6 @@ Use the fields on the *Options* panel to manage editor preferences.
|
||||
* When the *Auto-Rollback?* switch is set to *True*, failed queries are rolled
|
||||
back.
|
||||
|
||||
* When the *Brace matching?* switch is set to *True*, the editor will highlight
|
||||
pairs of matched braces.
|
||||
|
||||
* Use the *Font size* field to specify the font size that will be used in text
|
||||
boxes and editors.
|
||||
|
||||
* When the *Insert bracket pairs?* switch is set to *True*, the editor will
|
||||
automatically insert paired brackets.
|
||||
|
||||
* When the *Line wrapping* switch is set to *True*, the editor will implement
|
||||
line-wrapping behavior.
|
||||
|
||||
* When the *Prompt to save unsaved data changes?* switch is set to *True*, the
|
||||
editor will prompt the user to saved unsaved data when exiting the data
|
||||
editor.
|
||||
@@ -324,12 +343,6 @@ Use the fields on the *Options* panel to manage editor preferences.
|
||||
*True*, the editor will prompt the user to commit or rollback changes when
|
||||
exiting the Query Tool while the current transaction is not committed.
|
||||
|
||||
* Use the *Tab size* field to specify the number of spaces per tab character in
|
||||
the editor.
|
||||
|
||||
* When the *Use spaces* switch is set to *True*, the editor will insert spaces
|
||||
(instead of tab characters) when the tab key or auto-indent are used.
|
||||
|
||||
.. image:: images/preferences_sql_results_grid.png
|
||||
:alt: Preferences dialog sql results grid section
|
||||
:align: center
|
||||
|
||||
@@ -130,12 +130,27 @@ You can:
|
||||
|
||||
A result set is updatable if:
|
||||
|
||||
* All the columns belong to the same table.
|
||||
* All the primary keys of the table are selected.
|
||||
* No columns are duplicated.
|
||||
* All columns are either selected directly from a single table, or
|
||||
are not table columns at all (e.g. concatenation of 2 columns).
|
||||
Only columns that are selected directly from the table are
|
||||
editable, other columns are read-only.
|
||||
* All the primary key columns or OIDs of the table are selected in the
|
||||
result set.
|
||||
|
||||
An updatable result set can be modified just like in
|
||||
:ref:`View/Edit Data <modifying-data-grid>` mode.
|
||||
Any columns that are renamed or selected more than once are also read-only.
|
||||
|
||||
Editable and read-only columns are identified using pencil and lock icons
|
||||
(respectively) in the column headers.
|
||||
|
||||
.. image:: images/query_tool_editable_columns.png
|
||||
:alt: Query tool editable and read-only columns
|
||||
:align: center
|
||||
|
||||
The psycopg2 driver version should be equal to or above 2.8 for updatable
|
||||
query result sets to work.
|
||||
|
||||
An updatable result set is identical to the :ref:`Data Grid <data-grid>` in
|
||||
View/Edit Data mode, and can be modified in the same way.
|
||||
|
||||
If Auto-commit is off, the data changes are made as part of the ongoing
|
||||
transaction, if no transaction is ongoing a new one is initiated. The data
|
||||
@@ -208,6 +223,10 @@ The Query History tab displays information about recent commands:
|
||||
* The amount of time it took the server to process the query and return a
|
||||
result set.
|
||||
* Messages returned by the server (not noted on the *Messages* tab).
|
||||
* The source of the query (indicated by icons corresponding to the toolbar).
|
||||
|
||||
You can show or hide the queries generated internally by pgAdmin (during
|
||||
'View/Edit Data' or 'Save Data' operations).
|
||||
|
||||
To erase the content of the *Query History* tab, select *Clear history* from
|
||||
the *Clear* drop-down menu.
|
||||
|
||||
@@ -11,6 +11,8 @@ notes for it.
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
release_notes_4_13
|
||||
release_notes_4_12
|
||||
release_notes_4_11
|
||||
release_notes_4_10
|
||||
release_notes_4_9
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
************
|
||||
Version 4.12
|
||||
************
|
||||
|
||||
Release date: 2019-08-22
|
||||
|
||||
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.11.
|
||||
|
||||
New features
|
||||
************
|
||||
|
||||
| `Issue #4144 <https://redmine.postgresql.org/issues/4144>`_ - Add support of Compound Triggers for EPAS 12+.
|
||||
| `Issue #4333 <https://redmine.postgresql.org/issues/4333>`_ - Add support for planner support functions in PostgreSQL 12+ functions.
|
||||
| `Issue #4334 <https://redmine.postgresql.org/issues/4334>`_ - Add support for generated columns in Postgres 12+.
|
||||
| `Issue #4540 <https://redmine.postgresql.org/issues/4540>`_ - Use the full tab space for CodeMirror instances on dialogues where appropriate.
|
||||
| `Issue #4549 <https://redmine.postgresql.org/issues/4549>`_ - Allow a banner to be displayed on the login and other related pages showing custom text.
|
||||
| `Issue #4566 <https://redmine.postgresql.org/issues/4566>`_ - Allow enhanced cookie protection to be disabled for compatibility with dynamically addressed hosting environments.
|
||||
| `Issue #4570 <https://redmine.postgresql.org/issues/4570>`_ - Add an optimisation to the internal code responsible for searching for treeview nodes.
|
||||
| `Issue #4574 <https://redmine.postgresql.org/issues/4574>`_ - Display the row count in the popup message when counting table rows, not just in the properties list.
|
||||
| `Issue #4612 <https://redmine.postgresql.org/issues/4612>`_ - Add support in query history to show internal queries generated by pgAdmin during save data operations.
|
||||
|
||||
Housekeeping
|
||||
************
|
||||
|
||||
| `Issue #4546 <https://redmine.postgresql.org/issues/4546>`_ - Add Reverse Engineered SQL tests for Columns.
|
||||
| `Issue #4554 <https://redmine.postgresql.org/issues/4554>`_ - Add Reverse Engineered SQL tests for Trigger Functions.
|
||||
| `Issue #4555 <https://redmine.postgresql.org/issues/4555>`_ - Add Reverse Engineered SQL tests for Exclusion Constraint.
|
||||
| `Issue #4560 <https://redmine.postgresql.org/issues/4560>`_ - Add a --modules option to the RE-SQL test suite to allow testing of specific object types.
|
||||
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #3605 <https://redmine.postgresql.org/issues/3605>`_ - Fix issue where Deleting N number of rows makes first N number of rows disable.
|
||||
| `Issue #4179 <https://redmine.postgresql.org/issues/4179>`_ - Fix generation of reverse engineered SQL for tables with Greenplum 5.x.
|
||||
| `Issue #4229 <https://redmine.postgresql.org/issues/4229>`_ - Update wcDocker to allow the browser's context menu to be used except in tab strips and panel headers.
|
||||
| `Issue #4401 <https://redmine.postgresql.org/issues/4401>`_ - Ensure type names are properly encoded in the results grid.
|
||||
| `Issue #4414 <https://redmine.postgresql.org/issues/4414>`_ - Fix generation of reverse engineered SQL for partition table, partitions were shown as a child of indexes.
|
||||
| `Issue #4489 <https://redmine.postgresql.org/issues/4489>`_ - Update wcDocker to prevent window state loading creating blank dialogues.
|
||||
| `Issue #4490 <https://redmine.postgresql.org/issues/4490>`_ - Fix accessibility issue for checkbox in IE11.
|
||||
| `Issue #4492 <https://redmine.postgresql.org/issues/4492>`_ - Ensure the Query Tool doesn't throw an error when viewing the contents of a table with no columns.
|
||||
| `Issue #4496 <https://redmine.postgresql.org/issues/4496>`_ - Ensure columns can be created when they are IDENTITY fields with the CYCLE option enabled.
|
||||
| `Issue #4497 <https://redmine.postgresql.org/issues/4497>`_ - Ensure purely numeric comments can be saved on new columns.
|
||||
| `Issue #4508 <https://redmine.postgresql.org/issues/4508>`_ - Fix accessibility issue for Datetime cell in backgrid.
|
||||
| `Issue #4520 <https://redmine.postgresql.org/issues/4520>`_ - Ensure the query tool will work with older versions of psycopg2 than we officially support, albeit without updatable resultsets.
|
||||
| `Issue #4525 <https://redmine.postgresql.org/issues/4525>`_ - Ensure command tags are shown in the messages tab of the Query Tool.
|
||||
| `Issue #4536 <https://redmine.postgresql.org/issues/4536>`_ - Fix load on demand in View/Edit data mode.
|
||||
| `Issue #4552 <https://redmine.postgresql.org/issues/4552>`_ - Fix some errors thrown on the JS console when dragging text in the Query Tool.
|
||||
| `Issue #4559 <https://redmine.postgresql.org/issues/4559>`_ - Ensure triggers should be updated properly for EPAS server.
|
||||
| `Issue #4565 <https://redmine.postgresql.org/issues/4565>`_ - Fix the reverse engineered SQL for trigger functions with the WINDOW option selected.
|
||||
| `Issue #4578 <https://redmine.postgresql.org/issues/4578>`_ - Ensure enable trigger menu should be visible when trigger is disabled.
|
||||
| `Issue #4581 <https://redmine.postgresql.org/issues/4581>`_ - Ensure the comment on a Primary Key constraint can be edited under the Table node.
|
||||
| `Issue #4582 <https://redmine.postgresql.org/issues/4582>`_ - Fix console error when changing kind(SQL/BATCH) for pgAgent job step.
|
||||
| `Issue #4585 <https://redmine.postgresql.org/issues/4585>`_ - Fix double click issue to expand the contents of a cell if the resultset was not editable.
|
||||
| `Issue #4586 <https://redmine.postgresql.org/issues/4586>`_ - Fix generation of reverse engineered SQL for Rules.
|
||||
| `Issue #4635 <https://redmine.postgresql.org/issues/4635>`_ - Ensure compound triggers for event should be updated properly.
|
||||
| `Issue #4638 <https://redmine.postgresql.org/issues/4638>`_ - Ensure compound triggers should be displayed under Views.
|
||||
| `Issue #4641 <https://redmine.postgresql.org/issues/4641>`_ - Ensure Truncate option should be available for Compound Triggers.
|
||||
@@ -0,0 +1,65 @@
|
||||
************
|
||||
Version 4.13
|
||||
************
|
||||
|
||||
Release date: 2019-09-19
|
||||
|
||||
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.12.
|
||||
|
||||
New features
|
||||
************
|
||||
|
||||
| `Issue #2828 <https://redmine.postgresql.org/issues/2828>`_ - Added Gather Merge, Named Tuple Store Scan and Table Function Scan icon for explain module.
|
||||
| `Issue #4553 <https://redmine.postgresql.org/issues/4553>`_ - Don't wait for the database connection before rendering the Query Tool UI, for improved UX.
|
||||
| `Issue #4651 <https://redmine.postgresql.org/issues/4651>`_ - Allow configuration options to be set from the environment in the container distribution.
|
||||
| `Issue #4667 <https://redmine.postgresql.org/issues/4667>`_ - Ensure editable and read-only columns in Query Tool should be identified by icons and tooltips in the column header.
|
||||
| `Issue #4691 <https://redmine.postgresql.org/issues/4691>`_ - Add an Italian translation.
|
||||
| `Issue #4752 <https://redmine.postgresql.org/issues/4752>`_ - Refactor Dockerfile to avoid needing to run supporting scripts (i.e. 'docker build .' will work) and minimise layers.
|
||||
|
||||
Housekeeping
|
||||
************
|
||||
|
||||
| `Issue #4575 <https://redmine.postgresql.org/issues/4575>`_ - Add Reverse Engineered SQL tests for Schemas.
|
||||
| `Issue #4576 <https://redmine.postgresql.org/issues/4576>`_ - Add Reverse Engineered SQL tests for Views.
|
||||
| `Issue #4600 <https://redmine.postgresql.org/issues/4600>`_ - Add Reverse Engineered SQL tests for Rules.
|
||||
| `Issue #4616 <https://redmine.postgresql.org/issues/4616>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Keys.
|
||||
| `Issue #4617 <https://redmine.postgresql.org/issues/4617>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Servers.
|
||||
| `Issue #4618 <https://redmine.postgresql.org/issues/4618>`_ - Add Reverse Engineered and Modified SQL tests for Foreign Tables.
|
||||
| `Issue #4619 <https://redmine.postgresql.org/issues/4619>`_ - Add Reverse Engineered and Modified SQL tests for FTS Templates.
|
||||
| `Issue #4621 <https://redmine.postgresql.org/issues/4621>`_ - Add Reverse Engineered and Modified SQL tests for Indexes.
|
||||
| `Issue #4624 <https://redmine.postgresql.org/issues/4624>`_ - Add Reverse Engineered and Modified SQL tests for Primary Keys.
|
||||
| `Issue #4627 <https://redmine.postgresql.org/issues/4627>`_ - Add Reverse Engineered and Modified SQL tests for User Mappings.
|
||||
| `Issue #4690 <https://redmine.postgresql.org/issues/4690>`_ - Add Modified SQL tests for Resource Group.
|
||||
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #2706 <https://redmine.postgresql.org/issues/2706>`_ - Added ProjectSet icon for explain module.
|
||||
| `Issue #3778 <https://redmine.postgresql.org/issues/3778>`_ - Ensure Boolean columns should be editable using keyboard keys.
|
||||
| `Issue #3936 <https://redmine.postgresql.org/issues/3936>`_ - Further code refactoring to stabilise the Feature Tests.
|
||||
| `Issue #4381 <https://redmine.postgresql.org/issues/4381>`_ - Fix an issue where oid column should not be pasted when copy/paste row is used on query output containing the oid column.
|
||||
| `Issue #4408 <https://redmine.postgresql.org/issues/4408>`_ - Fix display of validation error message in SlickGrid cells.
|
||||
| `Issue #4412 <https://redmine.postgresql.org/issues/4412>`_ - Fix issue where Validated switch option is inverted for the Foreign Key.
|
||||
| `Issue #4419 <https://redmine.postgresql.org/issues/4419>`_ - Fix a debugger error when using Python 2.7.
|
||||
| `Issue #4461 <https://redmine.postgresql.org/issues/4461>`_ - Fix error while importing data to a table using Import/Export dialog and providing "Not null columns" option.
|
||||
| `Issue #4486 <https://redmine.postgresql.org/issues/4486>`_ - Ensure View should be created with special characters.
|
||||
| `Issue #4487 <https://redmine.postgresql.org/issues/4487>`_ - Ensure Boolean columns should be editable in View/Edit data and Query Tool.
|
||||
| `Issue #4577 <https://redmine.postgresql.org/issues/4577>`_ - Fix an error that could be seen when click on any system column of a table.
|
||||
| `Issue #4584 <https://redmine.postgresql.org/issues/4584>`_ - Unescape HTML entities in database names in the Query Tool title bar.
|
||||
| `Issue #4631 <https://redmine.postgresql.org/issues/4631>`_ - Add editor options for plain text mode and to disable block folding to workaround rendering speed issues in CodeMirror with very large scripts.
|
||||
| `Issue #4642 <https://redmine.postgresql.org/issues/4642>`_ - Ensure port and username should not be mandatory when a service is provided.
|
||||
| `Issue #4643 <https://redmine.postgresql.org/issues/4643>`_ - Fix Truncate option deselect issue for compound triggers.
|
||||
| `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node.
|
||||
| `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers.
|
||||
| `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container.
|
||||
| `Issue #4663 <https://redmine.postgresql.org/issues/4663>`_ - Fix exception in query history for python 2.7.
|
||||
| `Issue #4674 <https://redmine.postgresql.org/issues/4674>`_ - Fix query tool launch error if user name contain html characters.
|
||||
| `Issue #4681 <https://redmine.postgresql.org/issues/4681>`_ - Increase cache control max age for static files to improve performance over longer run.
|
||||
| `Issue #4698 <https://redmine.postgresql.org/issues/4698>`_ - Fix SQL issue of length and precision when changing the data type of Column.
|
||||
| `Issue #4702 <https://redmine.postgresql.org/issues/4702>`_ - Fix modified SQL for Index when reset the value of Fill factor and Clustered?.
|
||||
| `Issue #4703 <https://redmine.postgresql.org/issues/4703>`_ - Fix reversed engineered SQL for btree Index when provided sort order and NULLs.
|
||||
| `Issue #4726 <https://redmine.postgresql.org/issues/4726>`_ - Ensure sequence with negative value should be created.
|
||||
| `Issue #4727 <https://redmine.postgresql.org/issues/4727>`_ - Fix issue where EXEC script doesn't write the complete script for Procedures.
|
||||
| `Issue #4736 <https://redmine.postgresql.org/issues/4736>`_ - Fix query tool and view data issue with the Italian language.
|
||||
| `Issue #4742 <https://redmine.postgresql.org/issues/4742>`_ - Ensure Primary Key should be created with Index.
|
||||
| `Issue #4750 <https://redmine.postgresql.org/issues/4750>`_ - Fix query history exception for Python 3.6.
|
||||
@@ -9,8 +9,8 @@ A PostgreSQL rule allows you to define an additional action that will be
|
||||
performed when a SELECT, INSERT, UPDATE, or DELETE is performed against a table.
|
||||
|
||||
The *Rule* dialog organizes the development of a rule through the *General*,
|
||||
and *Definition* tabs. The *SQL* tab displays the SQL code generated by dialog
|
||||
selections.
|
||||
*Definition*, *Condition*, *Commands* tabs. The *SQL* tab displays the SQL code
|
||||
generated by dialog selections.
|
||||
|
||||
.. image:: images/rule_general.png
|
||||
:alt: Rule dialog general tab
|
||||
@@ -36,10 +36,22 @@ Use the fields in the *Definition* tab to write parameters:
|
||||
* Move the *Do Instead* switch to *Yes* indicate that the commands should be
|
||||
executed instead of the original command; if Do Instead specifies *No*, the
|
||||
rule will be invoked in addition to the original command.
|
||||
* Specify a SQL conditional expression that returns a boolean value in the
|
||||
*Condition* editor.
|
||||
* Provide a command in the *Commands* editor that defines the action performed
|
||||
by the rule.
|
||||
|
||||
Click the *Condition* tab to continue.
|
||||
|
||||
.. image:: images/rule_condition.png
|
||||
:alt: Rule dialog condition tab
|
||||
:align: center
|
||||
|
||||
Specify a SQL conditional expression that returns a boolean value in the editor.
|
||||
|
||||
Click the *Commands* tab to continue.
|
||||
|
||||
.. image:: images/rule_commands.png
|
||||
:alt: Rule dialog commands tab
|
||||
:align: center
|
||||
|
||||
Provide a command in the editor that defines the action performed by the rule.
|
||||
|
||||
Click the *SQL* tab to continue.
|
||||
|
||||
|
||||
@@ -59,24 +59,7 @@ In order to configure pgAdmin to run in server mode, it may be necessary to
|
||||
configure the Python code to run in multi-user mode, and then to configure the
|
||||
web server to find and execute the code.
|
||||
|
||||
Note that there are multiple configuration files that are read at startup by
|
||||
pgAdmin. These are as follows:
|
||||
|
||||
* ``config.py``: This is the main configuration file, and should not be modified.
|
||||
It can be used as a reference for configuration settings, that may be overridden
|
||||
in one of the following files.
|
||||
|
||||
* ``config_distro.py``: This file is read after ``config.py`` and is intended for
|
||||
packagers to change any settings that are required for their pgAdmin distribution.
|
||||
This may typically include certain paths and file locations. This file is optional,
|
||||
and may be created by packagers in the same directory as ``config.py`` if
|
||||
needed.
|
||||
|
||||
* ``config_local.py``: This file is read after ``config_distro.py`` and is intended
|
||||
for end users to change any default or packaging specific settings that they may
|
||||
wish to adjust to meet local preferences or standards. This file is optional,
|
||||
and may be created by administrators in the same directory as ``config.py`` if
|
||||
needed.
|
||||
See :ref:`config_py` for more information on configuration settings.
|
||||
|
||||
Python
|
||||
------
|
||||
@@ -117,6 +100,12 @@ In order to configure the Python code, follow these steps:
|
||||
|
||||
# chown www-data:www-data /var/lib/pgadmin4/pgadmin4.db
|
||||
|
||||
Hosting
|
||||
*******
|
||||
|
||||
There are many possible ways to host pgAdmin in server mode. Some examples are
|
||||
given below:
|
||||
|
||||
Apache HTTPD Configuration (Windows)
|
||||
------------------------------------
|
||||
|
||||
|
||||
@@ -47,15 +47,15 @@ a:hover {
|
||||
}
|
||||
|
||||
div.body dd, div.body blockquote {
|
||||
line-height: 1.8em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
div.body p{
|
||||
line-height: 1.8em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
div.body ul li{
|
||||
line-height: 1.8em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
div.body p strong{
|
||||
@@ -66,10 +66,6 @@ div.body li em, div.body p em{
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
div.toctree-wrapper ul li.toctree-l1{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.toctree-wrapper ul li.toctree-l1 a cite{
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
@@ -262,7 +258,7 @@ div.sphinxsidebar form div:first-child{
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
line-height: 1.4rem;
|
||||
line-height: 1.2rem;
|
||||
font-size: 0.85rem;
|
||||
color: #858da0;
|
||||
background-color: #ebeef3;
|
||||
@@ -468,6 +464,10 @@ i, cite, em, var, address, dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.note em {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
em {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@@ -91,9 +91,7 @@ the *Trigger* dialog:
|
||||
:alt: Trigger dialog sql tab
|
||||
:align: center
|
||||
|
||||
The example demonstrates creating a trigger named *log_update* that calls a
|
||||
procedure named *log_account_update* that logs any updates to the *distributors*
|
||||
table.
|
||||
The example demonstrates creating a trigger named *log_update*.
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* Click the *Save* button to save work.
|
||||
|
||||
@@ -8,7 +8,7 @@ Use the *Trigger function* dialog to create or manage a trigger_function. A
|
||||
trigger function defines the action that will be invoked when a trigger fires.
|
||||
|
||||
The *Trigger function* dialog organizes the development of a trigger function
|
||||
through the following dialog tabs: *General*, *Definition*, *Options*,
|
||||
through the following dialog tabs: *General*, *Definition*, *Code*, *Options*,
|
||||
*Parameters* and *Security*. The *SQL* tab displays the SQL code generated by
|
||||
dialog selections.
|
||||
|
||||
@@ -43,6 +43,13 @@ Use the fields in the *Definition* tab to define the trigger function:
|
||||
|
||||
* Use the drop-down listbox next to *Language* to select the implementation
|
||||
language. The default is *plpgsql*.
|
||||
|
||||
Click the *Code* tab to continue.
|
||||
|
||||
.. image:: images/trigger_function_code.png
|
||||
:alt: Trigger function dialog code tab
|
||||
:align: center
|
||||
|
||||
* Use the *Code* field to write the code that will execute when the trigger
|
||||
function is called.
|
||||
|
||||
@@ -158,9 +165,7 @@ the *Trigger function* dialog:
|
||||
:alt: Trigger function dialog sql tab
|
||||
:align: center
|
||||
|
||||
The example shown demonstrates creating a trigger function named *emp_stamp*
|
||||
that checks for a new employee's name, and checks that the employee's salary is
|
||||
a positive value.
|
||||
The example shown demonstrates creating a trigger function named *emp_stamp*.
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* Click the *Save* button to save work.
|
||||
|
||||
@@ -8,7 +8,7 @@ Use the *View* dialog to define a view. The view is not physically materialized;
|
||||
the query is executed each time the view is referenced in a query.
|
||||
|
||||
The *View* dialog organizes the development of a View through the following
|
||||
dialog tabs: *General*, *Definition*, and *Security*". The *SQL* tab displays
|
||||
dialog tabs: *General*, *Definition*, *Code* and *Security*". The *SQL* tab displays
|
||||
the SQL code generated by dialog selections.
|
||||
|
||||
Click the *General* tab to begin.
|
||||
@@ -49,7 +49,13 @@ Use the fields in the *Definition* tab to define properties of the view:
|
||||
* The *Cascaded* option specifies new rows are checked against the conditions
|
||||
of the view and all underlying base views.
|
||||
|
||||
* Use the workspace in the *Definition* field to write a query to create a view.
|
||||
Click the *Code* tab to continue.
|
||||
|
||||
.. image:: images/view_code.png
|
||||
:alt: View dialog code tab
|
||||
:align: center
|
||||
|
||||
Use the workspace in the *Code* tab to write a query to create a view.
|
||||
|
||||
Click the *Security* tab to continue.
|
||||
|
||||
@@ -104,8 +110,7 @@ the *View* dialog:
|
||||
:alt: View dialog sql tab
|
||||
:align: center
|
||||
|
||||
The example shown demonstrates creating a view named *distributor_codes* that
|
||||
includes the content of the *code* column from the *distributors* table.
|
||||
The example shown demonstrates creating a view named *distributor_code*.
|
||||
|
||||
* Click the *Info* button (i) to access online help.
|
||||
* Click the *Save* button to save work.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
pgadmin4/web/**/tests/
|
||||
pgadmin4/web/regression/
|
||||
@@ -1,99 +0,0 @@
|
||||
########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
# First of all, build frontend with NodeJS in a separate builder container
|
||||
# Node-8 is supported by all needed C++ packages
|
||||
FROM node:8 AS node-builder
|
||||
|
||||
COPY ./pgadmin4/web/ /pgadmin4/web/
|
||||
WORKDIR /pgadmin4/web
|
||||
|
||||
RUN yarn install --cache-folder ./ycache --verbose && \
|
||||
yarn run bundle && \
|
||||
rm -rf ./ycache ./pgadmin/static/js/generated/.cache
|
||||
|
||||
# Build Sphinx documentation in separate container
|
||||
FROM python:3.7-alpine3.9 as docs-builder
|
||||
|
||||
# Install only dependencies absolutely required for documentation building
|
||||
RUN apk add --no-cache make build-base openssl-dev libffi-dev && \
|
||||
pip install --no-cache-dir sphinx flask_security flask_paranoid python-dateutil flask_sqlalchemy flask_gravatar flask_migrate simplejson cryptography
|
||||
|
||||
COPY ./pgadmin4/ /pgadmin4
|
||||
|
||||
# Build the docs
|
||||
RUN LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C /pgadmin4/docs/en_US -f Makefile.sphinx html
|
||||
|
||||
# Get the PG binaries
|
||||
FROM postgres:9.4-alpine as pg94-builder
|
||||
FROM postgres:9.5-alpine as pg95-builder
|
||||
FROM postgres:9.6-alpine as pg96-builder
|
||||
FROM postgres:10-alpine as pg10-builder
|
||||
FROM postgres:11-alpine as pg11-builder
|
||||
|
||||
# Then install backend, copy static files and set up entrypoint
|
||||
FROM python:3.7-alpine3.9
|
||||
|
||||
# Copy the PG binaries
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.4/
|
||||
COPY --from=pg94-builder /usr/local/bin/psql /usr/local/pgsql-9.4/
|
||||
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.5/
|
||||
COPY --from=pg95-builder /usr/local/bin/psql /usr/local/pgsql-9.5/
|
||||
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_dump /usr/local/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/pg_restore /usr/local/pgsql-9.6/
|
||||
COPY --from=pg96-builder /usr/local/bin/psql /usr/local/pgsql-9.6/
|
||||
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_dump /usr/local/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/pg_restore /usr/local/pgsql-10/
|
||||
COPY --from=pg10-builder /usr/local/bin/psql /usr/local/pgsql-10/
|
||||
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_dump /usr/local/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_dumpall /usr/local/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/pg_restore /usr/local/pgsql-11/
|
||||
COPY --from=pg11-builder /usr/local/bin/psql /usr/local/pgsql-11/
|
||||
|
||||
WORKDIR /pgadmin4
|
||||
ENV PYTHONPATH=/pgadmin4
|
||||
|
||||
#Copy in the docs and JS/CSS bundles
|
||||
COPY --from=node-builder /pgadmin4/web/pgadmin/static/js/generated/ /pgadmin4/pgadmin/static/js/generated/
|
||||
COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs/
|
||||
|
||||
# Install build-dependencies, build & install C extensions and purge deps in one RUN step
|
||||
# so that deps do not increase the size of resulting image by remaining in layers
|
||||
COPY ./pgadmin4/requirements.txt /pgadmin4
|
||||
RUN apk add --no-cache --virtual build-deps build-base postgresql-dev libffi-dev linux-headers && \
|
||||
apk add postfix postgresql-client postgresql-libs && \
|
||||
pip install --upgrade pip && \
|
||||
pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir gunicorn && \
|
||||
apk del --no-cache build-deps
|
||||
|
||||
# Copy the code
|
||||
COPY ./pgadmin4/web /pgadmin4
|
||||
COPY ./run_pgadmin.py /pgadmin4
|
||||
COPY ./config_distro.py /pgadmin4
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Precompile and optimize python code to save time and space on startup
|
||||
RUN python -O -m compileall /pgadmin4
|
||||
|
||||
# Finish up
|
||||
VOLUME /var/lib/pgadmin
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,129 +1,24 @@
|
||||
This directory contains the files required to create a docker container running pgAdmin.
|
||||
This directory contains the files required to create a docker container running
|
||||
pgAdmin.
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Whilst you can just use the Dockerfile directly, it requires that various pre-configuration steps are performed, for
|
||||
example, the pgAdmin web code must be copied to `./web`, Sphinx documentation source must be copied to `./docs`
|
||||
and `requirements.txt` is also expected to be in this directory.
|
||||
From the top level directory of the pgAdmin source tree, simply run:
|
||||
|
||||
The recommended (and easy) way to build the container is to do:
|
||||
docker build .
|
||||
|
||||
```console
|
||||
cd $PGADMIN_SRC/
|
||||
workon pgadmin-venv
|
||||
make docker
|
||||
```
|
||||
You can also run 'make docker', which will call 'docker build .' but also tag
|
||||
the image like:
|
||||
|
||||
This will call the build script $PGADMIN_SRC/pkg/docker/build.sh which will prepare a staging directory containing all
|
||||
the required files, then build the container and push it to your repo.
|
||||
pgadmin4 pgadmin4:latest pgadmin4:4 pgadmin4:4.12
|
||||
|
||||
WARNING: The build should be run in a CLEAN source tree. Whilst some potentially
|
||||
dangerous files such as config_local.py or log files will be explicitly
|
||||
excluded from the final image, other files will not be.
|
||||
|
||||
Running
|
||||
=======
|
||||
|
||||
Environment Variables
|
||||
---------------------
|
||||
|
||||
The container will accept the following variables at startup:
|
||||
|
||||
*PGADMIN_DEFAULT_EMAIL*
|
||||
|
||||
This is the email address used when setting up the initial administrator account
|
||||
to login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_DEFAULT_PASSWORD*
|
||||
|
||||
This is the password used when setting up the initial administrator account to
|
||||
login to pgAdmin. This variable is required and must be set at launch time.
|
||||
|
||||
*PGADMIN_ENABLE_TLS*
|
||||
|
||||
Default: <null>
|
||||
|
||||
If left un-set, the container will listen on port 80 for connections in plain
|
||||
text. If set to any value, the container will listen on port 443 for TLS
|
||||
connections.
|
||||
|
||||
When TLS is enabled, a certificate and key must be provided. Typically these
|
||||
should be stored on the host file system and mounted from the container. The
|
||||
expected paths are /certs/server.crt and /certs/server.key
|
||||
|
||||
*PGADMIN_LISTEN_PORT*
|
||||
|
||||
Default: 80 or 443 (if TLS is enabled)
|
||||
|
||||
Allows the port that the server listens on to be set to a specific value rather
|
||||
than using the default.
|
||||
|
||||
*GUNICORN_THREADS*
|
||||
|
||||
Default: 25
|
||||
|
||||
Adjust the number of threads the Gunicorn server uses to handle incoming
|
||||
requests. This should typically be left as-is, except in highly loaded systems
|
||||
where it may be increased.
|
||||
|
||||
Mapped Files and Directories
|
||||
----------------------------
|
||||
|
||||
The following files or directories can be mapped from the container onto the
|
||||
host machine to allow configuration to be customised and shared between
|
||||
instances:
|
||||
|
||||
*/var/lib/pgadmin*
|
||||
|
||||
This is the working directory in which pgAdmin stores session data, user files,
|
||||
configuration files, and it's configuration database. Mapping this directory
|
||||
onto the host machine gives you an easy way to maintain configuration between
|
||||
|
||||
invocations of the container.
|
||||
|
||||
*/pgadmin4/config_local.py*
|
||||
|
||||
This file can be used to override configuration settings in pgAdmin. Settings
|
||||
found in config.py can be overridden with deployment specific values if
|
||||
required.
|
||||
|
||||
*/pgadmin4/servers.json*
|
||||
|
||||
If this file is mapped, server definitions found in it will be loaded at launch
|
||||
time. This allows connection information to be pre-loaded into the instance of
|
||||
pgAdmin in the container.
|
||||
|
||||
*/certs/server.cert*
|
||||
|
||||
If TLS is enabled, this file will be used as the servers TLS certificate.
|
||||
|
||||
*/certs/server.key*
|
||||
|
||||
If TLS is enabled, this file will be used as the key file for the servers TLS
|
||||
certificate.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Run a simple container over port 80:
|
||||
|
||||
```
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 80:80 \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-d dpage/pgadmin4
|
||||
```
|
||||
Run a TLS secured container using a shared config/storage directory in
|
||||
/private/var/lib/pgadmin on the host, and servers pre-loaded from
|
||||
/tmp/servers.json on the host:
|
||||
|
||||
```
|
||||
docker pull dpage/pgadmin4
|
||||
docker run -p 443:443 \
|
||||
-v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
|
||||
-v "/path/to/certificate.cert:/certs/server.cert" \
|
||||
-v "/path/to/certificate.key:/certs/server.key" \
|
||||
-v "/tmp/servers.json:/servers.json" \
|
||||
-e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
|
||||
-e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
|
||||
-e "PGADMIN_ENABLE_TLS=True" \
|
||||
-d dpage/pgadmin4
|
||||
```
|
||||
See the documentation at docs/en_US/container_deployment.rst for information on
|
||||
running the container.
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
# Runtime checks
|
||||
if [ ! -d runtime -a ! -d web ]; then
|
||||
echo This script must be run from the top-level directory of the source tree.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d .git -a ! -f .git/config ]; then
|
||||
echo This script must be run from a git checkout of the source tree.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the required package info
|
||||
APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
|
||||
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
|
||||
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
|
||||
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
|
||||
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
|
||||
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
|
||||
if [ ! -z ${APP_SUFFIX} ]; then
|
||||
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
||||
fi
|
||||
CONTAINER_NAME=`echo ${APP_NAME} | sed 's/ //g' | awk '{print tolower($0)}'`
|
||||
|
||||
# Output basic details to show we're working
|
||||
echo Building Docker Container for ${APP_NAME} version ${APP_LONG_VERSION}...
|
||||
|
||||
# Create/clearout the build directory
|
||||
echo Creating/cleaning required directories...
|
||||
if [ -d docker-build ]; then
|
||||
rm -rf docker-build
|
||||
fi
|
||||
|
||||
mkdir -p docker-build/pgadmin4
|
||||
|
||||
# Build the clean tree
|
||||
echo Copying source tree...
|
||||
git archive HEAD -- docs web requirements.txt | tar xvf - -C docker-build/pgadmin4
|
||||
|
||||
# Copy the Docker specific assets into place
|
||||
cp pkg/docker/Dockerfile \
|
||||
pkg/docker/entrypoint.sh \
|
||||
pkg/docker/config_distro.py \
|
||||
pkg/docker/run_pgadmin.py \
|
||||
pkg/docker/.dockerignore \
|
||||
docker-build/
|
||||
|
||||
# Build the container
|
||||
docker build docker-build -t ${CONTAINER_NAME} \
|
||||
-t ${CONTAINER_NAME}:latest \
|
||||
-t ${CONTAINER_NAME}:${APP_RELEASE} \
|
||||
-t ${CONTAINER_NAME}:${APP_LONG_VERSION}
|
||||
@@ -1,4 +0,0 @@
|
||||
HELP_PATH = '../../docs'
|
||||
DEFAULT_BINARY_PATHS = {
|
||||
'pg': '/usr/local/pgsql-11'
|
||||
}
|
||||
@@ -1,5 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create config_distro.py. This has some default config, as well as anything
|
||||
# provided by the user through the PGADMIN_CONFIG_* environment variables.
|
||||
# Only write the file on first launch.
|
||||
if [ ! -f /pgadmin4/config_distro.py ]; then
|
||||
cat << EOF > /pgadmin4/config_distro.py
|
||||
HELP_PATH = '../../docs'
|
||||
DEFAULT_BINARY_PATHS = {
|
||||
'pg': '/usr/local/pgsql-11'
|
||||
}
|
||||
EOF
|
||||
|
||||
# This is a bit kludgy, but necessary as the container uses BusyBox/ash as
|
||||
# it's shell and not bash which would allow a much cleaner implementation
|
||||
for var in $(env | grep PGADMIN_CONFIG_ | cut -d "=" -f 1); do
|
||||
echo ${var#PGADMIN_CONFIG_} = $(eval "echo \$$var") >> /pgadmin4/config_distro.py
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
||||
if [ -z "${PGADMIN_DEFAULT_EMAIL}" -o -z "${PGADMIN_DEFAULT_PASSWORD}" ]; then
|
||||
echo 'You need to specify PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables'
|
||||
@@ -15,7 +33,7 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
||||
# Importing pgadmin4 (from this script) is enough
|
||||
python run_pgadmin.py
|
||||
|
||||
export PGADMIN_SERVER_JSON_FILE=${PGADMIN_SERVER_JSON:-/pgadmin4/servers.json}
|
||||
export PGADMIN_SERVER_JSON_FILE=${PGADMIN_SERVER_JSON_FILE:-/pgadmin4/servers.json}
|
||||
# Pre-load any required servers
|
||||
if [ -f "${PGADMIN_SERVER_JSON_FILE}" ]; then
|
||||
/usr/local/bin/python /pgadmin4/setup.py --load-servers "${PGADMIN_SERVER_JSON_FILE}" --user ${PGADMIN_DEFAULT_EMAIL}
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
###############################################################################
|
||||
#
|
||||
# IMPORTANT:
|
||||
#
|
||||
# If runtime or build time dependencies are changed in this file, the committer
|
||||
# *must* ensure the DEB and RPM package maintainers are informed as soon as
|
||||
# possible.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
##############################################################################
|
||||
# NOTE: Any requirements with environment specifiers must be explicitly added
|
||||
# to pkg/pip/setup_pip.py (in extras_require), otherwise they will be
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>pgAdmin 4</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.11.0</string>
|
||||
<string>4.13.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>4.11.0</string>
|
||||
<string>4.13.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.10</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION = 4.11.0.0
|
||||
VERSION = 4.13.0.0
|
||||
QMAKE_TARGET_COMPANY = "The pgAdmin Development Team"
|
||||
QMAKE_TARGET_PRODUCT = "pgAdmin 4"
|
||||
QMAKE_TARGET_DESCRIPTION = "pgAdmin 4 Desktop Runtime"
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
requests>=2.21.0
|
||||
requests[security]>=2.21.0
|
||||
requests[security]>=2.21.0
|
||||
safety==1.8.5
|
||||
@@ -50,7 +50,7 @@ APP_ICON = 'pg-icon'
|
||||
|
||||
# Application version number components
|
||||
APP_RELEASE = 4
|
||||
APP_REVISION = 11
|
||||
APP_REVISION = 13
|
||||
|
||||
# Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string
|
||||
# for GA releases.
|
||||
@@ -59,7 +59,7 @@ APP_SUFFIX = ''
|
||||
# Numeric application version for upgrade checks. Should be in the format:
|
||||
# [X]XYYZZ, where X is the release version, Y is the revision, with a leading
|
||||
# zero if needed, and Z represents the suffix, with a leading zero if needed
|
||||
APP_VERSION_INT = 41100
|
||||
APP_VERSION_INT = 41300
|
||||
|
||||
# DO NOT CHANGE!
|
||||
# The application version string, constructed from the components
|
||||
@@ -85,6 +85,7 @@ LANGUAGES = {
|
||||
'zh': 'Chinese (Simplified)',
|
||||
'fr': 'French',
|
||||
'de': 'German',
|
||||
'it': 'Italian',
|
||||
'ja': 'Japanese',
|
||||
'ko': 'Korean',
|
||||
'pl': 'Polish',
|
||||
@@ -163,6 +164,9 @@ SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
|
||||
# has no effect on <= Python 2.7.
|
||||
MINIFY_PAGE = True
|
||||
|
||||
# Set the cache control max age for static files in flask to 1 year
|
||||
SEND_FILE_MAX_AGE_DEFAULT = 31556952
|
||||
|
||||
# This will be added to static urls as url parameter with value as
|
||||
# APP_VERSION_INT for cache busting on version upgrade. If the value is set as
|
||||
# None or empty string then it will not be added.
|
||||
@@ -187,6 +191,13 @@ else:
|
||||
else:
|
||||
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
|
||||
|
||||
# An optional login banner to show security warnings/disclaimers etc. at
|
||||
# login and password recovery etc. HTML may be included for basic formatting,
|
||||
# For example:
|
||||
# LOGIN_BANNER = "<h4>Authorised Users Only!</h4>" \
|
||||
# "Unauthorised use is strictly forbidden."
|
||||
LOGIN_BANNER = ""
|
||||
|
||||
##########################################################################
|
||||
# Log settings
|
||||
##########################################################################
|
||||
@@ -425,6 +436,16 @@ ALLOW_SAVE_TUNNEL_PASSWORD = False
|
||||
##########################################################################
|
||||
MASTER_PASSWORD_REQUIRED = True
|
||||
|
||||
##########################################################################
|
||||
# Allows pgAdmin4 to create session cookies based on IP address, so even
|
||||
# if a cookie is stolen, the attacker will not be able to connect to the
|
||||
# server using that stolen cookie.
|
||||
# Note: This can cause problems when the server is deployed in dynamic IP
|
||||
# address hosting environments, such as Kubernetes or behind load
|
||||
# balancers. In such cases, this option should be set to False.
|
||||
##########################################################################
|
||||
ENHANCED_COOKIE_PROTECTION = True
|
||||
|
||||
##########################################################################
|
||||
# Local config settings
|
||||
##########################################################################
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
|
||||
"""Change the not null constraints for port, username as it should not
|
||||
compulsory when service is provided. RM #4642
|
||||
|
||||
Revision ID: a77a0932a568
|
||||
Revises: 35f29b1701bd
|
||||
Create Date: 2019-09-09 15:41:30.084753
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from pgadmin.model import db
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a77a0932a568'
|
||||
down_revision = '35f29b1701bd'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# To Save previous data
|
||||
db.engine.execute("ALTER TABLE server RENAME TO server_old")
|
||||
|
||||
# Create table with drop constraint for port and username definition
|
||||
db.engine.execute("""
|
||||
CREATE TABLE server (
|
||||
id INTEGER NOT NULL,
|
||||
user_id INTEGER NOT NULL,
|
||||
servergroup_id INTEGER NOT NULL,
|
||||
name VARCHAR(128) NOT NULL,
|
||||
host VARCHAR(128),
|
||||
port INTEGER,
|
||||
maintenance_db VARCHAR(64) NOT NULL,
|
||||
username VARCHAR(64),
|
||||
password VARCHAR(64),
|
||||
role VARCHAR(64),
|
||||
ssl_mode VARCHAR(16) NOT NULL CHECK(ssl_mode IN
|
||||
( 'allow' , 'prefer' , 'require' , 'disable' ,
|
||||
'verify-ca' , 'verify-full' )
|
||||
),
|
||||
comment VARCHAR(1024),
|
||||
discovery_id VARCHAR(128),
|
||||
hostaddr TEXT(1024),
|
||||
db_res TEXT,
|
||||
passfile TEXT,
|
||||
sslcert TEXT,
|
||||
sslkey TEXT,
|
||||
sslrootcert TEXT,
|
||||
sslcrl TEXT,
|
||||
sslcompression INTEGER DEFAULT 0,
|
||||
bgcolor TEXT(10),
|
||||
fgcolor TEXT(10),
|
||||
service TEXT,
|
||||
use_ssh_tunnel INTEGER DEFAULT 0,
|
||||
tunnel_host TEXT,
|
||||
tunnel_port TEXT,
|
||||
tunnel_username TEXT,
|
||||
tunnel_authentication INTEGER DEFAULT 0,
|
||||
tunnel_identity_file TEXT, connect_timeout INTEGER DEFAULT 0, tunnel_password TEXT(64),
|
||||
PRIMARY KEY(id),
|
||||
FOREIGN KEY(user_id) REFERENCES user(id),
|
||||
FOREIGN KEY(servergroup_id) REFERENCES servergroup(id)
|
||||
)
|
||||
""")
|
||||
|
||||
# Copy old data again into table
|
||||
db.engine.execute("""
|
||||
INSERT INTO server (
|
||||
id, user_id, servergroup_id, name, host, port, maintenance_db,
|
||||
username, password, role, ssl_mode, comment, discovery_id, hostaddr,
|
||||
db_res, passfile, sslcert, sslkey, sslrootcert, sslcrl,
|
||||
sslcompression, bgcolor, fgcolor, service, use_ssh_tunnel,
|
||||
tunnel_host, tunnel_port, tunnel_username, tunnel_authentication,
|
||||
tunnel_identity_file
|
||||
|
||||
) SELECT
|
||||
id, user_id, servergroup_id, name, host, port, maintenance_db,
|
||||
username, password, role, ssl_mode, comment, discovery_id, hostaddr,
|
||||
db_res, passfile, sslcert, sslkey, sslrootcert, sslcrl,
|
||||
sslcompression, bgcolor, fgcolor, service, use_ssh_tunnel,
|
||||
tunnel_host, tunnel_port, tunnel_username, tunnel_authentication,
|
||||
tunnel_identity_file
|
||||
FROM server_old""")
|
||||
|
||||
# Remove old data
|
||||
db.engine.execute("DROP TABLE server_old")
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
||||
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"//": [
|
||||
"IMPORTANT:",
|
||||
"If runtime or build time dependencies are changed in this file, the ",
|
||||
"committer *must* ensure the DEB and RPM package maintainers are informed ",
|
||||
"as soon as possible."
|
||||
],
|
||||
"license": "PostgreSQL",
|
||||
"devDependencies": {
|
||||
"@babel/core": "~7.3.4",
|
||||
@@ -34,13 +40,14 @@
|
||||
"uglifyjs-webpack-plugin": "^2.1.2",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.2.3"
|
||||
"webpack-cli": "^3.2.3",
|
||||
"yarn-audit-html": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7",
|
||||
"alertifyjs": "1.7.1",
|
||||
"axios": "^0.18.0",
|
||||
"axios": "^0.18.1",
|
||||
"babel-plugin-transform-es2015-modules-amd": "^6.24.1",
|
||||
"babel-preset-es2015-without-strict": "~0.0.4",
|
||||
"babelify": "~10.0.0",
|
||||
@@ -63,7 +70,6 @@
|
||||
"exports-loader": "~0.7.0",
|
||||
"flotr2": "git+https://github.com/EnterpriseDB/Flotr2.git",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hard-source-webpack-plugin": "0.13.1",
|
||||
"immutability-helper": "^3.0.0",
|
||||
"imports-loader": "^0.8.0",
|
||||
"ip-address": "^5.8.9",
|
||||
@@ -89,7 +95,7 @@
|
||||
"underscore": "^1.9.1",
|
||||
"underscore.string": "^3.3.5",
|
||||
"watchify": "~3.11.1",
|
||||
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#41d8664d7c8e8f524426671df69a120127fff927",
|
||||
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#c95d295382ac61159e571af9c3b8f4f8ae81746d",
|
||||
"wkx": "^0.4.6"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -103,6 +109,10 @@
|
||||
"test:karma": "yarn run linter && yarn run karma start",
|
||||
"test:feature": "yarn run bundle && python regression/runtests.py --pkg feature_tests",
|
||||
"test": "yarn run test:karma-once && yarn run bundle && python regression/runtests.py",
|
||||
"pep8": "pycodestyle --config=../.pycodestyle ../docs && pycodestyle --config=../.pycodestyle ../pkg && pycodestyle --config=../.pycodestyle ../tools && pycodestyle --config=../.pycodestyle ../web"
|
||||
"pep8": "pycodestyle --config=../.pycodestyle ../docs && pycodestyle --config=../.pycodestyle ../pkg && pycodestyle --config=../.pycodestyle ../tools && pycodestyle --config=../.pycodestyle ../web",
|
||||
"auditjs-html": "yarn audit --json | yarn run yarn-audit-html --output ../auditjs.html",
|
||||
"auditjs": "yarn audit",
|
||||
"auditpy": "safety check --full-report",
|
||||
"audit": "yarn run auditjs && yarn run auditpy"
|
||||
}
|
||||
}
|
||||