Prev: Port for Microsoft Services for Unix (SFU) or SUA
Next: [HACKERS] solution to make static changes in pg_hba.conf file?
From: Pavel Stehule on 29 Dec 2009 14:50 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: > Pavel Stehule escribió: >> 2009/12/29 Tom Lane <tgl(a)sss.pgh.pa.us>: >> > Pavel Stehule <pavel.stehule(a)gmail.com> writes: >> >> so we cannot simply implement quote_ident on client side :(. So we >> >> have to use a real query. >> > >> >> It is acceptable for you? >> > >> > No, certainly not --- that adds a boatload of failure conditions. >> > Just quote it unconditionally. >> >> ok >> >> this function have to live in libpq - it needs some not exported >> functionality. But, it would not be a problem. > > Can we use a trick similar to pg_dump's? > I see it - we can move function (content) fmtId from dumputils.c to libpq. Pavel > -- > Alvaro Herrera                 http://www.CommandPrompt.com/ > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Alvaro Herrera on 29 Dec 2009 14:52 Pavel Stehule escribi�: > 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: > > Pavel Stehule escribi�: > >> 2009/12/29 Tom Lane <tgl(a)sss.pgh.pa.us>: > >> > Pavel Stehule <pavel.stehule(a)gmail.com> writes: > >> >> so we cannot simply implement quote_ident on client side :(. So we > >> >> have to use a real query. > >> > > >> >> It is acceptable for you? > >> > > >> > No, certainly not --- that adds a boatload of failure conditions. > >> > Just quote it unconditionally. > >> > >> ok > >> > >> this function have to live in libpq - it needs some not exported > >> functionality. But, it would not be a problem. > > > > Can we use a trick similar to pg_dump's? > > ?? See src/bin/pg_dump/keywords.c and fmtId in dumputils.c -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Pavel Stehule on 29 Dec 2009 14:55 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: > Pavel Stehule escribió: >> 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: >> > Pavel Stehule escribió: >> >> 2009/12/29 Tom Lane <tgl(a)sss.pgh.pa.us>: >> >> > Pavel Stehule <pavel.stehule(a)gmail.com> writes: >> >> >> so we cannot simply implement quote_ident on client side :(. So we >> >> >> have to use a real query. >> >> > >> >> >> It is acceptable for you? >> >> > >> >> > No, certainly not --- that adds a boatload of failure conditions. >> >> > Just quote it unconditionally. >> >> >> >> ok >> >> >> >> this function have to live in libpq - it needs some not exported >> >> functionality. But, it would not be a problem. >> > >> > Can we use a trick similar to pg_dump's? >> >> ?? > > See src/bin/pg_dump/keywords.c and fmtId in dumputils.c I found it. It is maybe too complex for using in psql. Pavel > > -- > Alvaro Herrera                 http://www.CommandPrompt.com/ > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 29 Dec 2009 14:57 Pavel Stehule <pavel.stehule(a)gmail.com> writes: > 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: >> Can we use a trick similar to pg_dump's? > I see it - we can move function (content) fmtId from dumputils.c to libpq. This is not a good idea. pg_dump can be expected to be up-to-date with the backend's keyword list, but libpq cannot. Just quote the thing unconditionally. It's not worth working harder than that anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Pavel Stehule on 29 Dec 2009 15:05
2009/12/29 Tom Lane <tgl(a)sss.pgh.pa.us>: > Pavel Stehule <pavel.stehule(a)gmail.com> writes: >> 2009/12/29 Alvaro Herrera <alvherre(a)commandprompt.com>: >>> Can we use a trick similar to pg_dump's? > >> I see it - we can move function (content) fmtId from dumputils.c to libpq. > > This is not a good idea. Â pg_dump can be expected to be up-to-date with > the backend's keyword list, but libpq cannot. > > Just quote the thing unconditionally. Â It's not worth working harder > than that anyway. I see it. Pavel > > Â Â Â Â Â Â Â Â Â Â Â Â regards, tom lane > -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |