Re: Function PostgreSQL 9.2 - Mailing list pgsql-general

From Mike Sofen
Subject Re: Function PostgreSQL 9.2
Date
Msg-id 01eb01d19aaf$66488cc0$32d9a640$@runbox.com
Whole thread Raw
In response to Re: Function PostgreSQL 9.2  ("drum.lucas@gmail.com" <drum.lucas@gmail.com>)
List pgsql-general

This is such a poorly designed, hacked together “thing” – it isn’t a database, it’s someone’s idea of how to store data when they don’t know how to store data, like they moved it from Access or Excel. 

 

Just start over and design a proper relational schema with best practices and you’ll save, oh, perhaps 10 years of wasted effort and 12 million emails.  This is as close to bandaids on bandaids on steroids that it comes.  Really – rethink your solution model.

 

Mike

 

From: drum.lucas@gmail.com   Sent: Tuesday, April 19, 2016 7:40 PM
Just forgot to say:


Does increment_client_code relate to users or some other table, say clients?

nope.. there is no link between them

If the users.code is empty/null, then the trigger has to get the last number from client_code_increment and put on the users.code column

pgsql-general by date:

Previous
From: "drum.lucas@gmail.com"
Date:
Subject: Re: Function PostgreSQL 9.2
Next
From: Albe Laurenz
Date:
Subject: Re: Enhancement Request