Skip to content

Commit 771e840

Browse files
danhsiungDan Hsiungcoderabbitai[bot]
authored
Postgresql default only load public schema (#16569)
* servers: Don't use an auth token that expires within 1 second. * Update packages/sdk/CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * more lint fixes * PostgreSQL: By default, only grab database table information for the public schema. * postgresql: bump up component versions * pnpm-lock * postgresql bump up package version --------- Co-authored-by: Dan Hsiung <dan@pipederam.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent b04188f commit 771e840

File tree

15 files changed

+17
-22
lines changed

15 files changed

+17
-22
lines changed

components/postgresql/actions/delete-rows/delete-rows.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Delete Row(s)",
55
key: "postgresql-delete-rows",
66
description: "Deletes a row or rows from a table. [See the documentation](https://node-postgres.com/features/queries)",
7-
version: "2.0.6",
7+
version: "2.0.7",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/execute-custom-query/execute-custom-query.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Execute SQL Query",
55
key: "postgresql-execute-custom-query",
66
description: "Execute a custom PostgreSQL query. See [our docs](https://pipedream.com/docs/databases/working-with-sql) to learn more about working with SQL in Pipedream.",
7-
version: "3.0.2",
7+
version: "3.0.3",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/find-row-custom-query/find-row-custom-query.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Find Row With Custom Query",
55
key: "postgresql-find-row-custom-query",
66
description: "Finds a row in a table via a custom query. [See the documentation](https://node-postgres.com/features/queries)",
7-
version: "2.0.6",
7+
version: "2.0.7",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/find-row/find-row.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Find Row",
55
key: "postgresql-find-row",
66
description: "Finds a row in a table via a lookup column. [See the documentation](https://node-postgres.com/features/queries)",
7-
version: "2.0.6",
7+
version: "2.0.7",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/insert-row/insert-row.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Insert Row",
55
key: "postgresql-insert-row",
66
description: "Adds a new row. [See the documentation](https://node-postgres.com/features/queries)",
7-
version: "2.0.6",
7+
version: "2.0.7",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/update-row/update-row.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Update Row",
55
key: "postgresql-update-row",
66
description: "Updates an existing row. [See the documentation](https://node-postgres.com/features/queries)",
7-
version: "2.0.6",
7+
version: "2.0.7",
88
type: "action",
99
props: {
1010
postgresql,

components/postgresql/actions/upsert-row/upsert-row.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Upsert Row",
66
key: "postgresql-upsert-row",
77
description: "Adds a new row or updates an existing row. [See the documentation](https://node-postgres.com/features/queries)",
8-
version: "2.0.6",
8+
version: "2.0.7",
99
type: "action",
1010
props: {
1111
postgresql,

components/postgresql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/postgresql",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "Pipedream PostgreSQL Components",
55
"main": "postgresql.app.mjs",
66
"keywords": [

components/postgresql/postgresql.app.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,17 @@ export default {
213213
* JSON-serializable object.
214214
*/
215215
async getSchema() {
216+
const filter = this.$auth.pd_schema_explorer_retrieve_all ?
217+
"NOT IN ('pg_catalog', 'information_schema')" :
218+
"= 'public'";
216219
const text = `
217220
SELECT table_name AS "tableName",
218221
column_name AS "columnName",
219222
is_nullable AS "isNullable",
220223
data_type AS "dataType",
221224
column_default AS "columnDefault"
222225
FROM information_schema.columns
223-
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
226+
WHERE table_schema ${filter}
224227
ORDER BY table_name,
225228
ordinal_position
226229
`;

components/postgresql/sources/new-column/new-column.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "New Column",
66
key: "postgresql-new-column",
77
description: "Emit new event when a new column is added to a table. [See the documentation](https://node-postgres.com/features/queries)",
8-
version: "2.0.6",
8+
version: "2.0.7",
99
type: "source",
1010
props: {
1111
...common.props,

0 commit comments

Comments
 (0)