Quick fix so \d indexname works again
От | Greg Sabino Mullane |
---|---|
Тема | Quick fix so \d indexname works again |
Дата | |
Msg-id | 200111052024.PAA30607@smtp10.atl.mindspring.net обсуждение исходный текст |
Ответы |
Re: Quick fix so \d indexname works again
|
Список | pgsql-patches |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I don't think this is worthy of a full patch, but could someone back off of the new pg_get_expr function in src/bin/psql/describe.c? It does not seem to work, producing this message when you try to "\d indexname" in psql: ERROR: Function 'pg_get_expr(text, oid)' does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts A quick fix is to remove the pg_get_expr function and replace it with a simple i.indpred. Either that, or get the pg_get_expr to work properly (which is beyond me at the moment :) *** ./src/bin/psql/describe.c.orig Mon Nov 5 15:11:02 2001 - --- ./src/bin/psql/describe.c Mon Nov 5 15:11:40 2001 *************** *** 654,660 **** PGresult *result; sprintf(buf, "SELECT i.indisunique, i.indisprimary, a.amname,\n" ! " pg_get_expr(i.indpred, i.indrelid) as indpred\n" "FROM pg_index i, pg_class c, pg_am a\n" "WHERE i.indexrelid = c.oid AND c.relname = '%s' AND c.relam = a.oid", name); - --- 654,660 ---- PGresult *result; sprintf(buf, "SELECT i.indisunique, i.indisprimary, a.amname,\n" ! " i.indpred\n" "FROM pg_index i, pg_class c, pg_am a\n" "WHERE i.indexrelid = c.oid AND c.relname = '%s' AND c.relam = a.oid", name); Thanks, Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200111051523 -----BEGIN PGP SIGNATURE----- Comment: http://www.turnstep.com/pgp.html iQA/AwUBO+b2VLybkGcUlkrIEQIdIQCfZxoEJdtbdLVte+WXZeSii+hJweMAoKue ixzMXJskieqIuLwOWA5ToWzP =Jkol -----END PGP SIGNATURE-----
В списке pgsql-patches по дате отправления: