Skip site navigation (1) Skip section navigation (2)

suddenly changed behaviour

From: "Coby Beck" <dragon(dot)huneault(at)bigpond(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: suddenly changed behaviour
Date: 2004-01-21 04:58:06
Message-ID: 000f01c3dfdb$2e8759c0$0301a8c0@asusp4 (view raw or flat)
Thread:
Lists: pgsql-admin
Hi,

Below is a snippet of code that is generated via another program:

CREATE TABLE tActuals
(
        kActual INTEGER NOT NULL DEFAULT NEXTVAL('kActual') PRIMARY KEY,
        fActualID TEXT,
        fAllocationCode TEXT,
        fWorkItemCode TEXT,
        fInvoicedAmount FLOAT,
        fDescription TEXT NOT NULL DEFAULT '<TEXTAREA rows=4 cols=50
tabindex=1 name=**FORMFIELD**></TEXTAREA>',
        pSUPPLIER INTEGER NOT NULL DEFAULT 0,
        fSupplierCode TEXT NOT NULL DEFAULT
''||dSupplierMenu('**FORMFIELD**','')||'',
        pBATCHENTRY INTEGER NOT NULL DEFAULT 0
);

I have reformatted it and snipped the bulk of fields.  The code chunks in
quotes given as default values are part of a complicated hack so that the
Zope application server will present some customized html where otherwise
there would just be a normal small textbox.  This is not my design but it
has served its purpose and I have used similar tricks all over the place in
an application I am working on.

Now for reasons unknown, Posgres will not build the data base.  I have
verified that the Create statement that fails now is identical to what was
working one hour ago.  A very simple function that merely returned a foreign
key field given the primary key was taking 60+ seconds to return on my
development version of the dB so I decided to drop the dB and build it
again.

I now get the error  "Relation "tsuppliers" does not exist" which happens
during execution of dSupplierMenu, which makes sense because tSuppliers
comes later in the file but does not make sense because there should be no
function call yet.  That should happen at run time when Zope fill in default
values.

Any one have any ideas what might be different, how I can restore it and
optionally how it might have happened?  I am using 7.2 (yes I know, but
upgrading is a bit of a difficulty at the moment)

Thanks in advance for assistance!

Coby Beck



pgsql-admin by date

Next:From: pginfoDate: 2004-01-21 11:07:23
Subject: Trigger example in "C"
Previous:From: Luis SousaDate: 2004-01-20 14:30:57
Subject: Re: [SQL] Database diagram

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group