pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Coby Beck <dragon.huneault@bigpond.com>
To: pgsql-admin@postgresql.org
Subject: suddenly changed behaviour
Date: Wed, 21 Jan 2004 15:58:06 +1100
Message-ID: <000f01c3dfdb$2e8759c0$0301a8c0@asusp4> (raw)

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





view thread (2+ messages)  latest in thread

Message-ID: <000f01c3dfdb$2e8759c0$0301a8c0@asusp4>
Permalink:  ../000f01c3dfdb$2e8759c0$0301a8c0@asusp4/
Also on:    postgresql.org/message-id/000f01c3dfdb$2e8759c0$0301a8c0@asusp4

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dragon.huneault@bigpond.com
  Subject: Re: suddenly changed behaviour
  In-Reply-To: <000f01c3dfdb$2e8759c0$0301a8c0@asusp4>
  References: <000f01c3dfdb$2e8759c0$0301a8c0@asusp4>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox