Bug 203 - Use of "name" type conflicts with pg_upgrade
Summary: Use of "name" type conflicts with pg_upgrade
Status: NEW
Alias: None
Product: Slony-I
Classification: Unclassified
Component: core scripts (show other bugs)
Version: devel
Hardware: All All
: low enhancement
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2011-05-04 12:27 UTC by Christopher Browne
Modified: 2011-07-22 13:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Browne 2011-05-04 12:27:55 UTC
Various columns in the Slony schema that store relation names use the "name" type.

According to PostgreSQL docs:

http://www.postgresql.org/docs/9.0/static/datatype-character.html

"The name type exists only for the storage of identifiers in the internal system catalogs and is not intended for use by the general user. Its length is currently defined as 64 bytes (63 usable characters plus terminator) but should be referenced using the constant NAMEDATALEN in C source code."

There is some room to quibble over whether Slony is an "internal system" thing or a "general user," but it has been observed that the use of the name type adversely affects attempts to run pg_upgrade against Slony nodes.

http://lists.slony.info/pipermail/slony1-general/2011-April/011620.html

It seems as though we should switch from "name" to "text".
Comment 1 Jan Wieck 2011-07-20 08:24:51 UTC
When switching to "text", will we have to add explicit casting to all the queries that use those columns?
Comment 2 Christopher Browne 2011-07-22 13:41:22 UTC
I just made the changes on sl_table/sl_sequence, and ran one of the old regression tests.

No problems encountered.

https://github.com/cbbrowne/slony1-engine/tree/bug203

I did not do any casting changes, and experienced no problems, so I don't expect any explicit casting should be necessary.