From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: possibility to read dumped table's name from file |
Date: | 2021-09-17 11:56:46 |
Message-ID: | F8FA10D6-6B7D-4AC8-8780-BB1257A543BB@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 17 Sep 2021, at 13:51, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> pá 17. 9. 2021 v 13:42 odesílatel Daniel Gustafsson <daniel(at)yesql(dot)se <mailto:daniel(at)yesql(dot)se>> napsal:
> I am unable to write a filter statement which can
> handle this relname:
>
> CREATE TABLE "a""
> ""b" (a integer);
>
> Are you able to craft one for that?
>
> I am not able to dump this directly in pg_dump. Is it possible?
Sure, see below:
$ ./bin/psql filter
psql (15devel)
Type "help" for help.
filter=# create table "a""
filter"# ""b" (a integer);
CREATE TABLE
filter=# select relname from pg_class order by oid desc limit 1;
relname
---------
a" +
"b
(1 row)
filter=# ^D\q
$ ./bin/pg_dump -s filter
--
-- PostgreSQL database dump
--
-- Dumped from database version 15devel
-- Dumped by pg_dump version 15devel
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: a" "b; Type: TABLE; Schema: public; Owner: danielg
--
CREATE TABLE public."a""
""b" (
a integer
);
ALTER TABLE public."a""
""b" OWNER TO danielg;
--
-- PostgreSQL database dump complete
--
--
Daniel Gustafsson https://vmware.com/
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2021-09-17 11:57:31 | Re: Added schema level support for publication. |
Previous Message | Pavel Stehule | 2021-09-17 11:51:34 | Re: proposal: possibility to read dumped table's name from file |