-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: > > On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier > <michael.paqu...@gmail.com <mailto:michael.paqu...@gmail.com>> > wrote: >>> >>> IMHO is more elegant create a procedure to encapsulate the code >>> to avoid redundancy. >> Yep, perhaps something like PQsetClientEncodingIfDifferent or >> similar would make sense. > > Well I think at this first moment we can just create a procedure > inside the dblink contrib and not touch in libpq.
Maybe a libpq function could be done for 9.4, but not for back branches. I don't think it makes sense to create a new function in dblink either - -- we're only talking about two lines of added redundancy which is less lines of code than a new function would add. But if we create PQsetClientEncodingIfDifferent() (or whatever) we can remove those extra lines in 9.4 ;-) Joe - -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSo9BnAAoJEDfy90M199hluqYP/RyoKh9nvC49H3xDl4wBLh4n 0OQ5nKJk8RkQ5d0MLbgn9t1xiQ+RltMcHQQEDoPlrn388DNTqOP31TqCHtI11S5l ZOjZw6eKvcp0KEzk723kZCq9d2N1uRb95K2z5jFUXbeZ2pO6yj8ohdnh8J9i1VQE iI5F76yeUJCO8YRmHMJs39Fy3Qtq0dsXesPYBRuEJqHy7cGh9hpYHPuqHFyW19Kg 0q1nPMa7TYpKRECa1wi+Gt2BJqd70AdnOZZipqqCR2bMJqmcpBy3jo94vedaarAz Wtunn4mk0/2LCNsAjgAdA33FYNfRpgL2c99IQ1DK5hwW9mdH2WH6G+8Eaf5zGhps ZWXJRQSYjfUCmMOoGudEKNX3H3prrNpqltQuC978i4ddKK/78yX1wJD10I8qVNHy MRlSoTFfomVYPW0054Jk6LR1f/RKGD4yuiIPDv8dI/gWINT1HveBGkvSf9wnY578 wjh2iLJ790o4CNK/334ooggPnlbBS4yQ+e+xsDcaJ2pc1cWJr/gCUf3cliUtv+rI MnFvsbq4vEjhBE3Tr6LYPwivCzKpiEz2L0/oO8sShHhm/dfr9UGPUyeDO43phP+m NFQXoh6oCuleBXk/N874yAp9EDXtu3g9E1PUMMsbplXjiH6mLp8OWmRbvQ9Qw3zu BFtOonWViuPz5ILObc3i =o0XG -----END PGP SIGNATURE----- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers