[OPEN-ILS-DEV] AUTO-GENERATED
Mike Rylander
mrylander at gmail.com
Wed May 27 11:28:59 EDT 2009
On Wed, May 27, 2009 at 9:25 AM, Grant Johnson <fgjohnson at upei.ca> wrote:
> I use pgAdminIII.
> And went into the function() biblio.autogen_tcn_value and just updated the string to UPEI.
> We have had a few collisions that this was used.
>
> Does this cause any other real issues except for aesthetic problems?
> If not then it's one of those "local mods" that we'll just have to document and remember...
>
This one in particular, not today. If an upgrade script decides to
depend on that value, obviously, hilarity will ensue. ;)
--miker
>
>
> F. Grant Johnson
> Systems Coordinator
> Robertson Library
> University of Prince Edward Island
>
>
>>>> On Wed, May 27, 2009 at 10:13 AM, in message
> <b918cf3d0905270613i421f95ceuafc07496abfc9869 at mail.gmail.com>, Mike Rylander
> <mrylander at gmail.com> wrote:
>> On Wed, May 27, 2009 at 9:01 AM, Grant Johnson <fgjohnson at upei.ca> wrote:
>>> Thanks Bill,
>>> How might I change that to UPEI or something?
>>
>> You could issue:
>>
>> CREATE OR REPLACE FUNCTION biblio.next_autogen_tcn_value () RETURNS
>> TEXT AS $$BEGIN RETURN 'UPEI-' ||
>> nextval('biblio.autogen_tcn_value_seq'::TEXT); END;
>>
>> in psql.
>>
>> That stored procedure is used when there is no non-colliding TCN
>> candidate in the record, and (hopefully!) no cadidate TCNs are in the
>> form of "AUTOGENERATED-{number}". Have you found a case where they
>> are, and you can't spot your own autogenerated tcns? As long as the
>> prefix is stable, and no one else is using it, any value is equivalent
>> -- UPEI and AUTOGENERATED serve the same purpose. I'm just concerned
>> about db-level (essentially) aesthetic changes that could potentially
>> cause upgrade pain.
>>
>> --miker
>>
>>>
>>>>>> On Wed, May 27, 2009 at 9:47 AM, in message <4A1D366A.6080606 at grpl.org>, Bill
>>> Ott <bott at grpl.org> wrote:
>>>> Grant Johnson said the following on 05/27/2009 08:42 AM:
>>>>> Where might I find the "AUTO-GENERATED" string for auto-generated TCN's during
>>>> Z39-50 import.
>>>>> Can't find it with a grep...
>>>>>
>>>>> Is it in the database?
>>>>>
>>>>>
>>>>
>>>> Indeed it is, assuming you're looking for the following.
>>>>
>>>> Found in:
>>>> Open-ILS/src/sql/Pg/1.2.2.3-1.2.3.0-upgrade.sql
>>>>
>>>>
>>>> CREATE OR REPLACE FUNCTION biblio.next_autogen_tcn_value () RETURNS TEXT
>>>> AS $$
>>>> BEGIN RETURN 'AUTOGENERATED-' ||
>>>> nextval('biblio.autogen_tcn_value_seq'::TEXT); END;
>>>
>>>
>>>
>>
>>
>
>
--
Mike Rylander
| VP, Research and Design
| Equinox Software, Inc. / The Evergreen Experts
| phone: 1-877-OPEN-ILS (673-6457)
| email: miker at esilibrary.com
| web: http://www.esilibrary.com
More information about the Open-ils-dev
mailing list