This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT subs.*,relmap.relname | |
FROM pg_catalog.pg_subscription_rel subs | |
JOIN pg_catalog.pg_class relmap ON subs.srrelid = relmap.oid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM pg_catalog.pg_publication_tables pubtables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER PUBLICATION name_of_publication | |
DROP TABLE name_of_table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER SUBSCRIPTION name_of_subscription REFRESH PUBLICATION; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER PUBLICATION name_of_publication | |
ADD TABLE name_of_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PUBLICATION name_of_publication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SUBSCRIPTION name_of_subscriber | |
CONNECTION 'host=publisher-host-url dbname=publisher-db-name port=db-port user=db-user password=password sslmode=require' | |
PUBLICATION name_of_publisher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "service_account", | |
"project_id": "my-project-id", | |
"private_key_id": "9ea5************502493fda904b4", | |
"private_key": "-----BEGIN PRIVATE KEY----- | |
***************** | |
-----END PRIVATE KEY-----\n", | |
"client_email": "1*****3-compute@developer.gserviceaccount.com", | |
"client_id": "10*******1", | |
"auth_uri": "https://accounts.google.com/o/oauth2/auth", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rows = [["Christine", "Johnson"], ["Nathan", "Mo"]] | |
worksheet.append_rows([*rows]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example from official doc: https://docs.gspread.org/en/latest/user-guide.html#formatting | |
worksheet.format("A2:B2", { | |
"backgroundColor": { | |
"red": 0.0, | |
"green": 0.0, | |
"blue": 0.0 | |
}, | |
"horizontalAlignment": "CENTER", | |
"textFormat": { | |
"foregroundColor": { |
NewerOlder