josacar / triki

Mysql, PostgreSQL and SQL dump obfuscator aka anonimizer
MIT License
38 stars 4 forks source link

HSTORE columns #15

Closed seigel closed 9 months ago

seigel commented 10 months ago

Hello! Just wondering if you had any insight or plans to do work on hstore columns?

Cheers

josacar commented 10 months ago

From what I see in the pg_dump should be possible using regular expressions inside a block, as the dump is like:

--
-- Name: phones; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.phones (
    id integer NOT NULL,
    title character varying(255),
    attr public.hstore
);

--                                                                                                                                                                                                                      [71/1452]
-- Data for Name: phones; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.phones (id, title, attr) FROM stdin;
1       iPhone 14 Pro   "type"=>"phone", "price"=>"1000", "company"=>"apple"
2       iPhone 14 Pro   "type"=>"phone", "price"=>"999", "company"=>"apple"
3       iPhone 14 Pro   "type"=>"phone", "price"=>"999", "company"=>"apple"
4       iPhone 14 Pro   "type"=>"phone", "price"=>"999", "company"=>"apple"
\.

What do you think?