Created
January 8, 2022 07:07
-
-
Save wchargin/6fd1ded5c683bc2420eb59ad53aeb5b7 to your computer and use it in GitHub Desktop.
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
$ createdb test_input | |
$ psql test_input -c "CREATE TABLE strs(s text); INSERT INTO strs(s) VALUES('-- hi');" | |
INSERT 0 1 | |
$ createdb test_output | |
$ pg_dump test_input | sed -e '/^--/d' | psql test_output | |
SET | |
SET | |
SET | |
SET | |
SET | |
set_config | |
------------ | |
(1 row) | |
SET | |
SET | |
SET | |
SET | |
SET | |
SET | |
CREATE TABLE | |
ALTER TABLE | |
COPY 0 | |
$ psql test_input -c "TABLE strs" | |
s | |
------- | |
-- hi | |
(1 row) | |
$ psql test_output -c "TABLE strs" | |
s | |
--- | |
(0 rows) | |
$ psql --version | |
psql (PostgreSQL) 12.8 (Ubuntu 12.8-1.pgdg20.04+1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment