|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.40 1998/06/15 19:29:40 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.41 1998/07/20 16:14:16 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -604,8 +604,8 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
|
604 | 604 | atttup = (HeapTuple) AttributeNumIndexScan(attrel, relation->rd_id, i);
|
605 | 605 |
|
606 | 606 | if (!HeapTupleIsValid(atttup))
|
607 |
| - elog(ERROR, "cannot find attribute %d of relation %.*s", i, |
608 |
| - NAMEDATALEN, &(relation->rd_rel->relname.data[0])); |
| 607 | + elog(ERROR, "cannot find attribute %d of relation %s", i, |
| 608 | + relation->rd_rel->relname.data); |
609 | 609 | attp = (AttributeTupleForm) GETSTRUCT(atttup);
|
610 | 610 |
|
611 | 611 | relation->rd_att->attrs[i - 1] =
|
@@ -1712,40 +1712,39 @@ AttrDefaultFetch(Relation relation)
|
1712 | 1712 | if (adform->adnum != attrdef[i].adnum)
|
1713 | 1713 | continue;
|
1714 | 1714 | if (attrdef[i].adsrc != NULL)
|
1715 |
| - elog(ERROR, "AttrDefaultFetch: second record found for attr %.*s in rel %.*s", |
1716 |
| - NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
1717 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1715 | + elog(ERROR, "AttrDefaultFetch: second record found for attr %s in rel %s", |
| 1716 | + relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
| 1717 | + relation->rd_rel->relname.data); |
1718 | 1718 |
|
1719 | 1719 | val = (struct varlena *) fastgetattr(tuple,
|
1720 | 1720 | Anum_pg_attrdef_adbin,
|
1721 | 1721 | adrel->rd_att, &isnull);
|
1722 | 1722 | if (isnull)
|
1723 |
| - elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %.*s in rel %.*s", |
1724 |
| - NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
1725 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1723 | + elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s", |
| 1724 | + relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
| 1725 | + relation->rd_rel->relname.data); |
1726 | 1726 | attrdef[i].adbin = textout(val);
|
1727 | 1727 | val = (struct varlena *) fastgetattr(tuple,
|
1728 | 1728 | Anum_pg_attrdef_adsrc,
|
1729 | 1729 | adrel->rd_att, &isnull);
|
1730 | 1730 | if (isnull)
|
1731 |
| - elog(ERROR, "AttrDefaultFetch: adsrc IS NULL for attr %.*s in rel %.*s", |
1732 |
| - NAMEDATALEN, relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
1733 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1731 | + elog(ERROR, "AttrDefaultFetch: adsrc IS NULL for attr %s in rel %s", |
| 1732 | + relation->rd_att->attrs[adform->adnum - 1]->attname.data, |
| 1733 | + relation->rd_rel->relname.data); |
1734 | 1734 | attrdef[i].adsrc = textout(val);
|
1735 | 1735 | break;
|
1736 | 1736 | }
|
1737 | 1737 |
|
1738 | 1738 | if (i >= ndef)
|
1739 |
| - elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %.*s", |
| 1739 | + elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %s", |
1740 | 1740 | adform->adnum,
|
1741 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1741 | + relation->rd_rel->relname.data); |
1742 | 1742 | ReleaseBuffer(buffer);
|
1743 | 1743 | }
|
1744 | 1744 |
|
1745 | 1745 | if (found < ndef)
|
1746 |
| - elog(ERROR, "AttrDefaultFetch: %d record not found for rel %.*s", |
1747 |
| - ndef - found, |
1748 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1746 | + elog(ERROR, "AttrDefaultFetch: %d record not found for rel %s", |
| 1747 | + ndef - found, relation->rd_rel->relname.data); |
1749 | 1748 |
|
1750 | 1749 | index_endscan(sd);
|
1751 | 1750 | pfree(sd);
|
@@ -1795,39 +1794,39 @@ RelCheckFetch(Relation relation)
|
1795 | 1794 | if (!HeapTupleIsValid(tuple))
|
1796 | 1795 | continue;
|
1797 | 1796 | if (found == ncheck)
|
1798 |
| - elog(ERROR, "RelCheckFetch: unexpected record found for rel %.*s", |
1799 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1797 | + elog(ERROR, "RelCheckFetch: unexpected record found for rel %s", |
| 1798 | + relation->rd_rel->relname.data); |
1800 | 1799 |
|
1801 | 1800 | rcname = (Name) fastgetattr(tuple,
|
1802 | 1801 | Anum_pg_relcheck_rcname,
|
1803 | 1802 | rcrel->rd_att, &isnull);
|
1804 | 1803 | if (isnull)
|
1805 |
| - elog(ERROR, "RelCheckFetch: rcname IS NULL for rel %.*s", |
1806 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1804 | + elog(ERROR, "RelCheckFetch: rcname IS NULL for rel %s", |
| 1805 | + relation->rd_rel->relname.data); |
1807 | 1806 | check[found].ccname = nameout(rcname);
|
1808 | 1807 | val = (struct varlena *) fastgetattr(tuple,
|
1809 | 1808 | Anum_pg_relcheck_rcbin,
|
1810 | 1809 | rcrel->rd_att, &isnull);
|
1811 | 1810 | if (isnull)
|
1812 |
| - elog(ERROR, "RelCheckFetch: rcbin IS NULL for rel %.*s", |
1813 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1811 | + elog(ERROR, "RelCheckFetch: rcbin IS NULL for rel %s", |
| 1812 | + relation->rd_rel->relname.data); |
1814 | 1813 | check[found].ccbin = textout(val);
|
1815 | 1814 | val = (struct varlena *) fastgetattr(tuple,
|
1816 | 1815 | Anum_pg_relcheck_rcsrc,
|
1817 | 1816 | rcrel->rd_att, &isnull);
|
1818 | 1817 | if (isnull)
|
1819 |
| - elog(ERROR, "RelCheckFetch: rcsrc IS NULL for rel %.*s", |
1820 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1818 | + elog(ERROR, "RelCheckFetch: rcsrc IS NULL for rel %s", |
| 1819 | + relation->rd_rel->relname.data); |
1821 | 1820 | check[found].ccsrc = textout(val);
|
1822 | 1821 | found++;
|
1823 | 1822 |
|
1824 | 1823 | ReleaseBuffer(buffer);
|
1825 | 1824 | }
|
1826 | 1825 |
|
1827 | 1826 | if (found < ncheck)
|
1828 |
| - elog(ERROR, "RelCheckFetch: %d record not found for rel %.*s", |
| 1827 | + elog(ERROR, "RelCheckFetch: %d record not found for rel %s", |
1829 | 1828 | ncheck - found,
|
1830 |
| - NAMEDATALEN, relation->rd_rel->relname.data); |
| 1829 | + relation->rd_rel->relname.data); |
1831 | 1830 |
|
1832 | 1831 | index_endscan(sd);
|
1833 | 1832 | pfree(sd);
|
|
0 commit comments