Hi,
While translating the backend's message catalog I found several things
that should probably be improved.
For example, in regis.c there are several strings talking about "regis
pattern". I had never heard of regis patterns. Turns out they are a
fast regex subset, used AFAICT only by the ispell code. Searching the
web I don't find any other reference to "regises" (regisen? reges?), so
I think we should avoid using the term. How about just changing the
messages to just say "regular expression" instead?
Additionally, I would like to apply the attached patch. Are there
objections?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
? cscope.files
? cscope.out
? msg
? src/include/access/.clog.h.swp
? src/tools/entab/entab
? src/tools/entab/entab.fix.diff
Index: src/backend/catalog/dependency.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/catalog/dependency.c,v
retrieving revision 1.69
diff -c -p -r1.69 dependency.c
*** src/backend/catalog/dependency.c 1 Jan 2008 19:45:48 -0000 1.69
--- src/backend/catalog/dependency.c 20 Jan 2008 00:10:54 -0000
*************** getObjectDescription(const ObjectAddress
*** 2002,2007 ****
--- 2002,2008 ----
SysScanDesc amscan;
HeapTuple tup;
Form_pg_amop amopForm;
+ StringInfoData opfam;
amopDesc = heap_open(AccessMethodOperatorRelationId,
AccessShareLock);
*************** getObjectDescription(const ObjectAddress
*** 2022,2031 ****
amopForm = (Form_pg_amop) GETSTRUCT(tup);
! appendStringInfo(&buffer, _("operator %d %s of "),
amopForm->amopstrategy,
! format_operator(amopForm->amopopr));
! getOpFamilyDescription(&buffer, amopForm->amopfamily);
systable_endscan(amscan);
heap_close(amopDesc, AccessShareLock);
--- 2023,2040 ----
amopForm = (Form_pg_amop) GETSTRUCT(tup);
! initStringInfo(&opfam);
! getOpFamilyDescription(&opfam, amopForm->amopfamily);
! /*
! * translator: %d is the operator strategy (a number), the
! * first %s is the textual form of the operator, and the second
! * %s is the description of the operator family.
! */
! appendStringInfo(&buffer, _("operator %d %s of %s"),
amopForm->amopstrategy,
! format_operator(amopForm->amopopr),
! opfam.data);
! pfree(opfam.data);
systable_endscan(amscan);
heap_close(amopDesc, AccessShareLock);
*************** getObjectDescription(const ObjectAddress
*** 2039,2044 ****
--- 2048,2054 ----
SysScanDesc amscan;
HeapTuple tup;
Form_pg_amproc amprocForm;
+ StringInfoData opfam;
amprocDesc = heap_open(AccessMethodProcedureRelationId,
AccessShareLock);
*************** getObjectDescription(const ObjectAddress
*** 2059,2068 ****
amprocForm = (Form_pg_amproc) GETSTRUCT(tup);
! appendStringInfo(&buffer, _("function %d %s of "),
amprocForm->amprocnum,
! format_procedure(amprocForm->amproc));
! getOpFamilyDescription(&buffer, amprocForm->amprocfamily);
systable_endscan(amscan);
heap_close(amprocDesc, AccessShareLock);
--- 2069,2086 ----
amprocForm = (Form_pg_amproc) GETSTRUCT(tup);
! initStringInfo(&opfam);
! getOpFamilyDescription(&opfam, amprocForm->amprocfamily);
! /*
! * translator: %d is the function number, the first %s is the
! * textual form of the function with arguments, and the second
! * %s is the description of the operator family.
! */
! appendStringInfo(&buffer, _("function %d %s of %s"),
amprocForm->amprocnum,
! format_procedure(amprocForm->amproc),
! opfam.data);
! pfree(opfam.data);
systable_endscan(amscan);
heap_close(amprocDesc, AccessShareLock);
Index: src/backend/catalog/pg_enum.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/catalog/pg_enum.c,v
retrieving revision 1.4
diff -c -p -r1.4 pg_enum.c
*** src/backend/catalog/pg_enum.c 1 Jan 2008 19:45:48 -0000 1.4
--- src/backend/catalog/pg_enum.c 20 Jan 2008 00:10:54 -0000
*************** EnumValuesCreate(Oid enumTypeOid, List *
*** 87,94 ****
if (strlen(lab) > (NAMEDATALEN - 1))
ereport(ERROR,
(errcode(ERRCODE_INVALID_NAME),
! errmsg("invalid enum label \"%s\", must be %d characters or less",
! lab,
NAMEDATALEN - 1)));
--- 87,94 ----
if (strlen(lab) > (NAMEDATALEN - 1))
ereport(ERROR,
(errcode(ERRCODE_INVALID_NAME),
! errmsg("invalid enum label \"%s\"", lab),
! errdetail("Labels must be %d characters or less.",
NAMEDATALEN - 1)));
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org