From ef056eb05078c4acc4138e59244d71a810945af9 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 7 May 2007 06:06:38 +0000 Subject: Adding db documentation to /trunk/ git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1147 4979c152-3d1c-0410-bac9-87ea11338e46 --- doc/database/ledgersmb.html | 9495 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 9495 insertions(+) create mode 100644 doc/database/ledgersmb.html (limited to 'doc/database/ledgersmb.html') diff --git a/doc/database/ledgersmb.html b/doc/database/ledgersmb.html new file mode 100644 index 00000000..1011d507 --- /dev/null +++ b/doc/database/ledgersmb.html @@ -0,0 +1,9495 @@ + + + + + + Index for ledgersmb + + + + + + + + + + +



Dumped on 2007-03-22

+

Index of database - ledgersmb

+ + + + + + + +
+

Table: + acc_trans +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
acc_trans Structure
F-KeyNameTypeDescription
+ + trans_idinteger + + + + + + +
+ + + chart.id + + + chart_idinteger + + + + + + + NOT NULL + + + +
+ + amountnumeric + + + + + + +
+ + transdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + sourcetext + + + + + + +
+ + clearedboolean + + + + DEFAULT false + + +
+ + fx_transactionboolean + + + + DEFAULT false + + +
+ + project_idinteger + + + + + + +
+ + memotext + + + + + + +
+ + invoice_idinteger + + + + + + +
+ + + + entry_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + acc_trans_chart_id_key chart_id + + acc_trans_source_key lower(source) + + acc_trans_trans_id_key trans_id + + acc_trans_transdate_key transdate + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + ap +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ap Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + invnumbertext + + + + + + +
+ + transdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + vendor_idinteger + + + + + + +
+ + taxincludedboolean + + + + DEFAULT false + + +
+ + amountnumeric + + + + + + +
+ + netamountnumeric + + + + + + +
+ + paidnumeric + + + + + + +
+ + datepaiddate + + + + + + +
+ + duedatedate + + + + + + +
+ + invoiceboolean + + + + DEFAULT false + + +
+ + ordnumbertext + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + notestext + + + + + + +
+ + employee_idinteger + + + + + + +
+ + tillcharacter varying(20) + + + + + + +
+ + quonumbertext + + + + + + +
+ + intnotestext + + + + + + +
+ + department_idinteger + + + + + + +
+ + shipviatext + + + + + + +
+ + language_codecharacter varying(6) + + + + + + +
+ + ponumbertext + + + + + + +
+ + shippingpointtext + + + + + + +
+ + termssmallint + + + + + + +
+ + + + + + + + + + + + + + + + + ap_employee_id_key employee_id + + ap_id_key id + + ap_invnumber_key invnumber + + ap_ordnumber_key ordnumber + + ap_quonumber_key quonumber + + ap_transdate_key transdate + + ap_vendor_id_key vendor_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + ar +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ar Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + invnumbertext + + + + + + +
+ + transdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + customer_idinteger + + + + + + +
+ + taxincludedboolean + + + + + + +
+ + amountnumeric + + + + + + +
+ + netamountnumeric + + + + + + +
+ + paidnumeric + + + + + + +
+ + datepaiddate + + + + + + +
+ + duedatedate + + + + + + +
+ + invoiceboolean + + + + DEFAULT false + + +
+ + shippingpointtext + + + + + + +
+ + termssmallint + + + + + + +
+ + notestext + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + ordnumbertext + + + + + + +
+ + employee_idinteger + + + + + + +
+ + tillcharacter varying(20) + + + + + + +
+ + quonumbertext + + + + + + +
+ + intnotestext + + + + + + +
+ + department_idinteger + + + + + + +
+ + shipviatext + + + + + + +
+ + language_codecharacter varying(6) + + + + + + +
+ + ponumbertext + + + + + + +
+ + + + + + + + + + + + + + + + + ar_customer_id_key customer_id + + ar_employee_id_key employee_id + + ar_id_key id + + ar_invnumber_key invnumber + + ar_ordnumber_key ordnumber + + ar_quonumber_key quonumber + + ar_transdate_key transdate + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + assembly +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
assembly Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + parts_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + qtynumeric + + + + + + +
+ + bomboolean + + + + + + +
+ + adjboolean + + + + + + +
+ + + + + + + + + + + + + + + + + assembly_id_key id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + audittrail +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
audittrail Structure
F-KeyNameTypeDescription
+ + trans_idinteger + + + + + + +
+ + tablenametext + + + + + + +
+ + referencetext + + + + + + +
+ + formnametext + + + + + + +
+ + actiontext + + + + + + +
+ + transdatetimestamp without time zone + + + + DEFAULT now() + + +
+ + employee_idinteger + + + + + + +
+ + + + entry_idbigserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + audittrail_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + business +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
business Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + descriptiontext + + + + + + +
+ + discountnumeric + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + chart +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
chart Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + accnotext + + + NOT NULL + + + +
+ + descriptiontext + + + + + + +
+ + charttypecharacter(1) + + + + DEFAULT 'A'::bpchar + + +
+ + categorycharacter(1) + + + + + + +
+ + linktext + + + + + + +
+ + gifi_accnotext + + + + + + +
+ + contraboolean + + + + DEFAULT false + + +
+ + + + + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + chart_category_key category + + chart_gifi_accno_key gifi_accno + + chart_id_key id + + chart_link_key link + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + custom_field_catalog +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
custom_field_catalog Structure
F-KeyNameTypeDescription
+ + + + field_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + custom_table_catalog.table_id + + + table_idinteger + + + + + + + + + + +
+ + field_nametext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + custom_table_catalog +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
custom_table_catalog Structure
F-KeyNameTypeDescription
+ + + + table_idserial + + PRIMARY KEY + + + + + + + + + +
+ + extendstext + + + + + + +
+ + table_nametext + + + + + + +
+ + + + + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + customer +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
customer Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + namecharacter varying(64) + + + + + + +
+ + address1character varying(32) + + + + + + +
+ + address2character varying(32) + + + + + + +
+ + citycharacter varying(32) + + + + + + +
+ + statecharacter varying(32) + + + + + + +
+ + zipcodecharacter varying(10) + + + + + + +
+ + countrycharacter varying(32) + + + + + + +
+ + contactcharacter varying(64) + + + + + + +
+ + phonecharacter varying(20) + + + + + + +
+ + faxcharacter varying(20) + + + + + + +
+ + emailtext + + + + + + +
+ + notestext + + + + + + +
+ + discountnumeric + + + + + + +
+ + taxincludedboolean + + + + DEFAULT false + + +
+ + creditlimitnumeric + + + + + + +
+ + termssmallint + + + + + + +
+ + customernumbercharacter varying(32) + + + + + + +
+ + cctext + + + + + + +
+ + bcctext + + + + + + +
+ + business_idinteger + + + + + + +
+ + taxnumbercharacter varying(32) + + + + + + +
+ + sic_codecharacter varying(6) + + + + + + +
+ + ibancharacter varying(34) + + + + + + +
+ + biccharacter varying(11) + + + + + + +
+ + employee_idinteger + + + + + + +
+ + language_codecharacter varying(6) + + + + + + +
+ + pricegroup_idinteger + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + startdatedate + + + + + + +
+ + enddatedate + + + + + + +
+ + + + + + + + + + + + + + + + + customer_contact_key lower((contact)::text) + + customer_customernumber_key customernumber + + customer_id_key id + + customer_name_key lower((name)::text) + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + customertax +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
customertax Structure
F-KeyNameTypeDescription
+ + + + customer_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + chart_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + customer_customer_id_key customer_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + defaults +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
defaults Structure
F-KeyNameTypeDescription
+ + + + setting_keytext + + PRIMARY KEY + + + + + + + + + +
+ + valuetext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + department +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
department Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + descriptiontext + + + + + + +
+ + rolecharacter(1) + + + + DEFAULT 'P'::bpchar + + +
+ + + + + + + + + + + + + + + + + department_id_key id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + dpt_trans +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
dpt_trans Structure
F-KeyNameTypeDescription
+ + + + trans_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + department_idinteger + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + employee +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
employee Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + logintext + + + + + + +
+ + namecharacter varying(64) + + + + + + +
+ + address1character varying(32) + + + + + + +
+ + address2character varying(32) + + + + + + +
+ + citycharacter varying(32) + + + + + + +
+ + statecharacter varying(32) + + + + + + +
+ + zipcodecharacter varying(10) + + + + + + +
+ + countrycharacter varying(32) + + + + + + +
+ + workphonecharacter varying(20) + + + + + + +
+ + homephonecharacter varying(20) + + + + + + +
+ + startdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + enddatedate + + + + + + +
+ + notestext + + + + + + +
+ + rolecharacter varying(20) + + + + + + +
+ + salesboolean + + + + DEFAULT false + + +
+ + emailtext + + + + + + +
+ + ssncharacter varying(20) + + + + + + +
+ + ibancharacter varying(34) + + + + + + +
+ + biccharacter varying(11) + + + + + + +
+ + manageridinteger + + + + + + +
+ + employeenumbercharacter varying(32) + + + + + + +
+ + dobdate + + + + + + +
+ + + + + + + + + + + + + + + + + employee_id_key id + + employee_name_key lower((name)::text) + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + exchangerate +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
exchangerate Structure
F-KeyNameTypeDescription
+ + + + currcharacter(3) + + PRIMARY KEY + + + + + + + + + +
+ + + + transdatedate + + PRIMARY KEY + + + + + + + + + +
+ + buynumeric + + + + + + +
+ + sellnumeric + + + + + + +
+ + + + + + + + + + + + + + + + + exchangerate_ct_key curr, transdate + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + gifi +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
gifi Structure
F-KeyNameTypeDescription
+ + + + accnotext + + PRIMARY KEY + + + + + + + + + +
+ + descriptiontext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + gl +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
gl Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + referencetext + + + + + + +
+ + descriptiontext + + + + + + +
+ + transdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + employee_idinteger + + + + + + +
+ + notestext + + + + + + +
+ + department_idinteger + + + + + + +
+ + + + + + + + + + + + + + + + + gl_description_key lower(description) + + gl_employee_id_key employee_id + + gl_id_key id + + gl_reference_key reference + + gl_transdate_key transdate + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + inventory +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
inventory Structure
F-KeyNameTypeDescription
+ + warehouse_idinteger + + + + + + +
+ + parts_idinteger + + + + + + +
+ + trans_idinteger + + + + + + +
+ + orderitems_idinteger + + + + + + +
+ + qtynumeric + + + + + + +
+ + shippingdatedate + + + + + + +
+ + employee_idinteger + + + + + + +
+ + + + entry_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + invoice +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
invoice Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('invoiceid'::regclass) + + +
+ + trans_idinteger + + + + + + +
+ + parts_idinteger + + + + + + +
+ + descriptiontext + + + + + + +
+ + qtyinteger + + + + + + +
+ + allocatedinteger + + + + + + +
+ + sellpricenumeric + + + + + + +
+ + fxsellpricenumeric + + + + + + +
+ + discountreal + + + + + + +
+ + assemblyitemboolean + + + + DEFAULT false + + +
+ + unitcharacter varying(5) + + + + + + +
+ + project_idinteger + + + + + + +
+ + deliverydatedate + + + + + + +
+ + serialnumbertext + + + + + + +
+ + notestext + + + + + + +
+ + + + + + + + + + + + + + + + + invoice_id_key id + + invoice_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + jcitems +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jcitems Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('jcitemsid'::regclass) + + +
+ + project_idinteger + + + + + + +
+ + parts_idinteger + + + + + + +
+ + descriptiontext + + + + + + +
+ + qtynumeric + + + + + + +
+ + allocatednumeric + + + + + + +
+ + sellpricenumeric + + + + + + +
+ + fxsellpricenumeric + + + + + + +
+ + serialnumbertext + + + + + + +
+ + checkedintimestamp with time zone + + + + + + +
+ + checkedouttimestamp with time zone + + + + + + +
+ + employee_idinteger + + + + + + +
+ + notestext + + + + + + +
+ + + + + + + + + + + + + + + + + jcitems_id_key id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + language +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
language Structure
F-KeyNameTypeDescription
+ + + + codecharacter varying(6) + + PRIMARY KEY + + + + + + + + + +
+ + descriptiontext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + makemodel +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
makemodel Structure
F-KeyNameTypeDescription
+ + + + parts_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + maketext + + + + + + +
+ + modeltext + + + + + + +
+ + + + + + + + + + + + + + + + + makemodel_make_key lower(make) + + makemodel_model_key lower(model) + + makemodel_parts_id_key parts_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + oe +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oe Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + ordnumbertext + + + + + + +
+ + transdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + vendor_idinteger + + + + + + +
+ + customer_idinteger + + + + + + +
+ + amountnumeric + + + + + + +
+ + netamountnumeric + + + + + + +
+ + reqdatedate + + + + + + +
+ + taxincludedboolean + + + + + + +
+ + shippingpointtext + + + + + + +
+ + notestext + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + employee_idinteger + + + + + + +
+ + closedboolean + + + + DEFAULT false + + +
+ + quotationboolean + + + + DEFAULT false + + +
+ + quonumbertext + + + + + + +
+ + intnotestext + + + + + + +
+ + department_idinteger + + + + + + +
+ + shipviatext + + + + + + +
+ + language_codecharacter varying(6) + + + + + + +
+ + ponumbertext + + + + + + +
+ + termssmallint + + + + + + +
+ + + + + + + + + + + + + + + + + oe_employee_id_key employee_id + + oe_id_key id + + oe_ordnumber_key ordnumber + + oe_transdate_key transdate + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + orderitems +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
orderitems Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('orderitemsid'::regclass) + + +
+ + trans_idinteger + + + + + + +
+ + parts_idinteger + + + + + + +
+ + descriptiontext + + + + + + +
+ + qtynumeric + + + + + + +
+ + sellpricenumeric + + + + + + +
+ + discountnumeric + + + + + + +
+ + unitcharacter varying(5) + + + + + + +
+ + project_idinteger + + + + + + +
+ + reqdatedate + + + + + + +
+ + shipnumeric + + + + + + +
+ + serialnumbertext + + + + + + +
+ + notestext + + + + + + +
+ + + + + + + + + + + + + + + + + orderitems_id_key id + + orderitems_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + parts +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parts Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + partnumbertext + + + + + + +
+ + descriptiontext + + + + + + +
+ + unitcharacter varying(5) + + + + + + +
+ + listpricenumeric + + + + + + +
+ + sellpricenumeric + + + + + + +
+ + lastcostnumeric + + + + + + +
+ + priceupdatedate + + + + DEFAULT ('now'::text)::date + + +
+ + weightnumeric + + + + + + +
+ + onhandnumeric + + + + + + +
+ + notestext + + + + + + +
+ + makemodelboolean + + + + DEFAULT false + + +
+ + assemblyboolean + + + + DEFAULT false + + +
+ + alternateboolean + + + + DEFAULT false + + +
+ + ropreal + + + + + + +
+ + inventory_accno_idinteger + + + + + + +
+ + income_accno_idinteger + + + + + + +
+ + expense_accno_idinteger + + + + + + +
+ + bintext + + + + + + +
+ + obsoleteboolean + + + + DEFAULT false + + +
+ + bomboolean + + + + DEFAULT false + + +
+ + imagetext + + + + + + +
+ + drawingtext + + + + + + +
+ + microfichetext + + + + + + +
+ + partsgroup_idinteger + + + + + + +
+ + project_idinteger + + + + + + +
+ + avgcostnumeric + + + + + + +
+ + + + + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + parts_description_key lower(description) + + parts_id_key id + + parts_partnumber_key lower(partnumber) + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + partscustomer +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
partscustomer Structure
F-KeyNameTypeDescription
+ + parts_idinteger + + + + + + +
+ + customer_idinteger + + + + + + +
+ + pricegroup_idinteger + + + + + + +
+ + pricebreaknumeric + + + + + + +
+ + sellpricenumeric + + + + + + +
+ + validfromdate + + + + + + +
+ + validtodate + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + + + entry_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + partsgroup +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
partsgroup Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + partsgrouptext + + + + + + +
+ + + + + + + + + + + + + + + + + partsgroup_id_key id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + partstax +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
partstax Structure
F-KeyNameTypeDescription
+ + + parts.id + + + + + parts_idinteger + + + + + + PRIMARY KEY + + + + + + + + + +
+ + + chart.id + + + + + chart_idinteger + + + + + + PRIMARY KEY + + + + + + + + + +
+ + + taxcategory.taxcategory_id + + + taxcategory_idinteger + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + partstax_parts_id_key parts_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + partsvendor +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
partsvendor Structure
F-KeyNameTypeDescription
+ + vendor_idinteger + + + + + + +
+ + parts_idinteger + + + + + + +
+ + partnumbertext + + + + + + +
+ + leadtimesmallint + + + + + + +
+ + lastcostnumeric + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + + + entry_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + partsvendor_parts_id_key parts_id + + partsvendor_vendor_id_key vendor_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + pricegroup +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
pricegroup Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + pricegrouptext + + + + + + +
+ + + + + + + + + + + + + + + + + pricegroup_id_key id + + pricegroup_pricegroup_key pricegroup + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + project +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
project Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + projectnumbertext + + + + + + +
+ + descriptiontext + + + + + + +
+ + startdatedate + + + + + + +
+ + enddatedate + + + + + + +
+ + parts_idinteger + + + + + + +
+ + productionnumeric + + + + + + +
+ + completednumeric + + + + + + +
+ + customer_idinteger + + + + + + +
+ + + + + + + + + + + + + + + + + project_id_key id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + recurring +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
recurring Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + + + +
+ + referencetext + + + + + + +
+ + startdatedate + + + + + + +
+ + nextdatedate + + + + + + +
+ + enddatedate + + + + + + +
+ + repeatsmallint + + + + + + +
+ + unitcharacter varying(6) + + + + + + +
+ + howmanyinteger + + + + + + +
+ + paymentboolean + + + + DEFAULT false + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + recurringemail +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
recurringemail Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + + + +
+ + formnametext + + + + + + +
+ + formattext + + + + + + +
+ + messagetext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + recurringprint +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
recurringprint Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + + + +
+ + formnametext + + + + + + +
+ + formattext + + + + + + +
+ + printertext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + shipto +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
shipto Structure
F-KeyNameTypeDescription
+ + trans_idinteger + + + + + + +
+ + shiptonamecharacter varying(64) + + + + + + +
+ + shiptoaddress1character varying(32) + + + + + + +
+ + shiptoaddress2character varying(32) + + + + + + +
+ + shiptocitycharacter varying(32) + + + + + + +
+ + shiptostatecharacter varying(32) + + + + + + +
+ + shiptozipcodecharacter varying(10) + + + + + + +
+ + shiptocountrycharacter varying(32) + + + + + + +
+ + shiptocontactcharacter varying(64) + + + + + + +
+ + shiptophonecharacter varying(20) + + + + + + +
+ + shiptofaxcharacter varying(20) + + + + + + +
+ + shiptoemailtext + + + + + + +
+ + + + entry_idserial + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + shipto_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + sic +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
sic Structure
F-KeyNameTypeDescription
+ + + + codecharacter varying(6) + + PRIMARY KEY + + + + + + + + + +
+ + sictypecharacter(1) + + + + + + +
+ + descriptiontext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + status +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
status Structure
F-KeyNameTypeDescription
+ + + + trans_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + formnametext + + + + + + +
+ + printedboolean + + + + DEFAULT false + + +
+ + emailedboolean + + + + DEFAULT false + + +
+ + spoolfiletext + + + + + + +
+ + + + + + + + + + + + + + + + + status_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + tax +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tax Structure
F-KeyNameTypeDescription
+ + + chart.id + + + + + chart_idinteger + + + + + + PRIMARY KEY + + + + + + + + + +
+ + ratenumeric + + + + + + +
+ + taxnumbertext + + + + + + +
+ + validtodate + + + + + + +
+ + passinteger + + + NOT NULL + + + +
+ + + taxmodule.taxmodule_id + + + taxmodule_idinteger + + + + + + + NOT NULL + DEFAULT 1 + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + taxcategory +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
taxcategory Structure
F-KeyNameTypeDescription
+ + + + taxcategory_idserial + + PRIMARY KEY + + + + + + + + + +
+ + taxcategorynametext + + + NOT NULL + + + +
+ + + taxmodule.taxmodule_id + + + taxmodule_idinteger + + + + + + + NOT NULL + + + +
+ + + + + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + taxmodule +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
taxmodule Structure
F-KeyNameTypeDescription
+ + + + taxmodule_idserial + + PRIMARY KEY + + + + + + + + + +
+ + taxmodulenametext + + + NOT NULL + + + +
+ + + + + + + + + + + + + +

Tables referencing this one via Foreign Key Constraints:

+ + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + transactions +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
transactions Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + + + +
+ + table_nametext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + translation +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
translation Structure
F-KeyNameTypeDescription
+ + + + trans_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + language_codecharacter varying(6) + + PRIMARY KEY + + + + + + + + + +
+ + descriptiontext + + + + + + +
+ + + + + + + + + + + + + + + + + translation_trans_id_key trans_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + vendor +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vendor Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + namecharacter varying(64) + + + + + + +
+ + address1character varying(32) + + + + + + +
+ + address2character varying(32) + + + + + + +
+ + citycharacter varying(32) + + + + + + +
+ + statecharacter varying(32) + + + + + + +
+ + zipcodecharacter varying(10) + + + + + + +
+ + countrycharacter varying(32) + + + + + + +
+ + contactcharacter varying(64) + + + + + + +
+ + phonecharacter varying(20) + + + + + + +
+ + faxcharacter varying(20) + + + + + + +
+ + emailtext + + + + + + +
+ + notestext + + + + + + +
+ + termssmallint + + + + + + +
+ + taxincludedboolean + + + + DEFAULT false + + +
+ + vendornumbercharacter varying(32) + + + + + + +
+ + cctext + + + + + + +
+ + bcctext + + + + + + +
+ + gifi_accnocharacter varying(30) + + + + + + +
+ + business_idinteger + + + + + + +
+ + taxnumbercharacter varying(32) + + + + + + +
+ + sic_codecharacter varying(6) + + + + + + +
+ + discountnumeric + + + + + + +
+ + creditlimitnumeric + + + + + + +
+ + ibancharacter varying(34) + + + + + + +
+ + biccharacter varying(11) + + + + + + +
+ + employee_idinteger + + + + + + +
+ + language_codecharacter varying(6) + + + + + + +
+ + pricegroup_idinteger + + + + + + +
+ + currcharacter(3) + + + + + + +
+ + startdatedate + + + + + + +
+ + enddatedate + + + + + + +
+ + + + + + + + + + + + + + + + + vendor_contact_key lower((contact)::text) + + vendor_id_key id + + vendor_name_key lower((name)::text) + + vendor_vendornumber_key vendornumber + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + vendortax +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
vendortax Structure
F-KeyNameTypeDescription
+ + + + vendor_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + chart_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + + + + + + + + + + + + + + + + vendortax_vendor_id_key vendor_id + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + warehouse +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
warehouse Structure
F-KeyNameTypeDescription
+ + + + idinteger + + PRIMARY KEY + + + + + + + DEFAULT nextval('id'::regclass) + + +
+ + descriptiontext + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ +
+

Table: + yearend +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
yearend Structure
F-KeyNameTypeDescription
+ + + + trans_idinteger + + PRIMARY KEY + + + + + + + + + +
+ + transdatedate + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +

+ Index - + Schema public +

+ + + + +
+

Function: + add_custom_field( character varying, character varying, character varying ) +

+

Returns: boolean

+

Language: PLPGSQL

+ +
+DECLARE
+table_name ALIAS FOR $1;
+new_field_name ALIAS FOR $2;
+field_datatype ALIAS FOR $3;
+
+BEGIN
+	EXECUTE 'SELECT TABLE_ID FROM custom_table_catalog 
+		WHERE extends = ''' || table_name || ''' ';
+	IF NOT FOUND THEN
+		BEGIN
+			INSERT INTO custom_table_catalog (extends) 
+				VALUES (table_name);
+			EXECUTE 'CREATE TABLE custom_'||table_name || 
+				' (row_id INT PRIMARY KEY)';
+		EXCEPTION WHEN duplicate_table THEN
+			-- do nothing
+		END;
+	END IF;
+	EXECUTE 'INSERT INTO custom_field_catalog (field_name, table_id)
+	VALUES ( ''' || new_field_name ||''', (SELECT table_id FROM custom_table_catalog
+		WHERE extends = '''|| table_name || '''))';
+	EXECUTE 'ALTER TABLE custom_'||table_name || ' ADD COLUMN ' 
+		|| new_field_name || ' ' || field_datatype;
+	RETURN TRUE;
+END;
+
+ +
+

Function: + avgcost( integer ) +

+

Returns: double precision

+

Language: PLPGSQL

+ +
+
+DECLARE
+
+v_cost float;
+v_qty float;
+v_parts_id alias for $1;
+
+BEGIN
+
+  SELECT INTO v_cost, v_qty SUM(i.sellprice * i.qty), SUM(i.qty)
+  FROM invoice i
+  JOIN ap a ON (a.id = i.trans_id)
+  WHERE i.parts_id = v_parts_id;
+  
+  IF v_cost IS NULL THEN
+    v_cost := 0;
+  END IF;
+
+  IF NOT v_qty IS NULL THEN
+    IF v_qty = 0 THEN
+      v_cost := 0;
+    ELSE
+      v_cost := v_cost/v_qty;
+    END IF;
+  END IF;
+
+RETURN v_cost;
+END;
+
+ +
+

Function: + check_department( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+
+declare
+  dpt_id int;
+
+begin
+ 
+  if new.department_id = 0 then
+    delete from dpt_trans where trans_id = new.id;
+    return NULL;
+  end if;
+
+  select into dpt_id trans_id from dpt_trans where trans_id = new.id;
+  
+  if dpt_id > 0 then
+    update dpt_trans set department_id = new.department_id where trans_id = dpt_id;
+  else
+    insert into dpt_trans (trans_id, department_id) values (new.id, new.department_id);
+  end if;
+return NULL;
+
+end;
+
+ +
+

Function: + check_inventory( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+
+declare
+  itemid int;
+  row_data inventory%rowtype;
+
+begin
+
+  if not old.quotation then
+    for row_data in select * from inventory where trans_id = old.id loop
+      select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;
+
+      if itemid is null then
+	delete from inventory where trans_id = old.id and orderitems_id = row_data.orderitems_id;
+      end if;
+    end loop;
+  end if;
+return old;
+end;
+
+ +
+

Function: + del_customer( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+begin
+  delete from shipto where trans_id = old.id;
+  delete from customertax where customer_id = old.id;
+  delete from partscustomer where customer_id = old.id;
+  return NULL;
+end;
+
+ +
+

Function: + del_department( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+begin
+  delete from dpt_trans where trans_id = old.id;
+  return NULL;
+end;
+
+ +
+

Function: + del_exchangerate( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+
+declare
+  t_transdate date;
+  t_curr char(3);
+  t_id int;
+  d_curr text;
+
+begin
+
+  select into d_curr substr(value,1,3) from defaults where setting_key = 'curr';
+  
+  if TG_RELNAME = 'ar' then
+    select into t_curr, t_transdate curr, transdate from ar where id = old.id;
+  end if;
+  if TG_RELNAME = 'ap' then
+    select into t_curr, t_transdate curr, transdate from ap where id = old.id;
+  end if;
+  if TG_RELNAME = 'oe' then
+    select into t_curr, t_transdate curr, transdate from oe where id = old.id;
+  end if;
+
+  if d_curr != t_curr then
+
+    select into t_id a.id from acc_trans ac
+    join ar a on (a.id = ac.trans_id)
+    where a.curr = t_curr
+    and ac.transdate = t_transdate
+
+    except select a.id from ar a where a.id = old.id
+    
+    union
+    
+    select a.id from acc_trans ac
+    join ap a on (a.id = ac.trans_id)
+    where a.curr = t_curr
+    and ac.transdate = t_transdate
+    
+    except select a.id from ap a where a.id = old.id
+    
+    union
+    
+    select o.id from oe o
+    where o.curr = t_curr
+    and o.transdate = t_transdate
+    
+    except select o.id from oe o where o.id = old.id;
+
+    if not found then
+      delete from exchangerate where curr = t_curr and transdate = t_transdate;
+    end if;
+  end if;
+return old;
+
+end;
+
+ +
+

Function: + del_recurring( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+BEGIN
+  DELETE FROM recurring WHERE id = old.id;
+  DELETE FROM recurringemail WHERE id = old.id;
+  DELETE FROM recurringprint WHERE id = old.id;
+  RETURN NULL;
+END;
+
+ +
+

Function: + del_vendor( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+begin
+  delete from shipto where trans_id = old.id;
+  delete from vendortax where vendor_id = old.id;
+  delete from partsvendor where vendor_id = old.id;
+  return NULL;
+end;
+
+ +
+

Function: + del_yearend( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+begin
+  delete from yearend where trans_id = old.id;
+  return NULL;
+end;
+
+ +
+

Function: + drop_custom_field( character varying, character varying ) +

+

Returns: boolean

+

Language: PLPGSQL

+ +
+DECLARE
+table_name ALIAS FOR $1;
+custom_field_name ALIAS FOR $2;
+BEGIN
+	DELETE FROM custom_field_catalog 
+	WHERE field_name = custom_field_name AND 
+		table_id = (SELECT table_id FROM custom_table_catalog 
+			WHERE extends = table_name);
+	EXECUTE 'ALTER TABLE custom_' || table_name || 
+		' DROP COLUMN ' || custom_field_name;
+	RETURN TRUE;	
+END;
+
+ +
+

Function: + lastcost( integer ) +

+

Returns: double precision

+

Language: PLPGSQL

+ +
+
+DECLARE
+
+v_cost float;
+v_parts_id alias for $1;
+
+BEGIN
+
+  SELECT INTO v_cost sellprice FROM invoice i
+  JOIN ap a ON (a.id = i.trans_id)
+  WHERE i.parts_id = v_parts_id
+  ORDER BY a.transdate desc, a.id desc
+  LIMIT 1;
+
+  IF v_cost IS NULL THEN
+    v_cost := 0;
+  END IF;
+
+RETURN v_cost;
+END;
+
+ +
+

Function: + trigger_parts_short( ) +

+

Returns: "trigger"

+

Language: PLPGSQL

+ +
+BEGIN
+  IF NEW.onhand >= NEW.rop THEN
+    NOTIFY parts_short;
+  END IF;
+  RETURN NEW;
+END;
+
+ +
+

Function: + update_user( integer, text ) +

+

Returns: integer

+

Language: SQL

+

Takes int4 which is users.id and text which is username. Will update username based on id. Username is unique

+
+   UPDATE users SET username = '$2' WHERE id = $1;
+   SELECT 1;
+   
+ + + +

Generated by PostgreSQL Autodoc

+

W3C HTML 4.01 Strict

+ -- cgit v1.2.3