[OPEN-ILS-DEV] AUTO-GENERATED

Grant Johnson fgjohnson at upei.ca
Wed May 27 09:25:01 EDT 2009


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...



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;
>>
>>
>>
> 
> 



More information about the Open-ils-dev mailing list