Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l47N7-0000Lh-Kd for pgsql-general@arkaria.postgresql.org; Mon, 25 Jan 2021 19:17:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l47N6-0007WK-Iq for pgsql-general@arkaria.postgresql.org; Mon, 25 Jan 2021 19:17:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l47N5-0007WA-Tm for pgsql-general@lists.postgresql.org; Mon, 25 Jan 2021 19:17:56 +0000 Received: from mx32.harte-lyne.ca ([216.185.71.32]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l47My-0005me-2q for pgsql-general@lists.postgresql.org; Mon, 25 Jan 2021 19:17:49 +0000 Received: from mx32.harte-lyne.ca (localhost [127.0.32.1]) by mx32.harte-lyne.ca (Postfix) with ESMTP id 8A103301CB for ; Mon, 25 Jan 2021 14:17:44 -0500 (EST) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from mx32.harte-lyne.ca ([127.0.32.1]) by mx32.harte-lyne.ca (mx32.harte-lyne.ca [127.0.32.1]) (amavisd-new, port 10024) with ESMTP id jrQjUXqbNG-V for ; Mon, 25 Jan 2021 14:17:42 -0500 (EST) Received: from webmail.harte-lyne.ca (webmail.hamilton.harte-lyne.ca [216.185.71.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx32.harte-lyne.ca (Postfix) with ESMTPSA id 4868A301BF for ; Mon, 25 Jan 2021 14:17:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1611602262; bh=DirY2N3RaYVrr18PxdirOVgloWaP2QxuTzWuGu4BwZw=; h=Date:Subject:From:To:Reply-To; b=KzypmoWOAefDAmWx+Yyug14IXQRvW/DEP0S0EhwGTeeD06Z8sy8DTiMyyD5K2lQIs EPbcsNkc14ovntx22yPe/fPy4m8jThfPsiQ5ahqnJ4bwX4zDHd51AapxAGAaYEL1hS ED9n36huyTeBqSb6NHvIvxDgCtp5fP1HEVGx6/fXtm6CNES6mjZAmFU8cnB0xyoX04 vwcEBWS+imLKTKrulPYCJ+F9dlsmcD9FyeC0jy/2HAisWh2X8YfqDcc/fPSClX89bG HFnd7lkNfuyCidzTpZObRG5PPzLBhG9n3almdK39ah6Ab6Zvce3/2282pRLpuCKCFm uyHgquI6VkCzg== Received: from 216.185.71.41 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Mon, 25 Jan 2021 14:17:42 -0500 Message-ID: Date: Mon, 25 Jan 2021 14:17:42 -0500 Subject: Need another set of eyes on this From: "James B. Byrne" To: pgsql-general@lists.postgresql.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am recreating a test database with data provided for a series of future exercises. Presently I am trying to understand why a simple insert statement is not working. The user invoking this insert is 'postgres' and has superuser privileges. The error is this: postgres : STATEMENT: INSERT INTO public.stock( stock_num, manu_code, description, unit_price, unit, unit_descr) VALUES (3, "SHM", "aluminum Bat", 180.00, "case", "12/case"); postgres : ERROR: 42703: column "SHM" does not exist at character 105 postgres : LOCATION: errorMissingColumn, parse_relation.c:3194 postgres : STATEMENT: INSERT INTO public.stock( stock_num, manu_code, description, unit_price, unit, unit_descr) VALUES (3, "SHM", "aluminum bat", 180.00, "case", "12/case"); The create script for this table is this: -- Table: public.stock -- DROP TABLE public.stock; CREATE TABLE public.stock ( stock_num smallint NOT NULL, manu_code character(3) COLLATE pg_catalog."default", description character(20) COLLATE pg_catalog."default", unit_price money, unit character(4) COLLATE pg_catalog."default", unit_descr character(15) COLLATE pg_catalog."default" ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.stock OWNER to hll_4gl_testing; COMMENT ON TABLE public.stock IS 'The stock table is a catalog of the items sold by the distributor.'; COMMENT ON COLUMN public.stock.stock_num IS 'Stock number that identifies type of item'; COMMENT ON COLUMN public.stock.manu_code IS 'Manufacturer code (foreign key to manufact table)'; COMMENT ON COLUMN public.stock.description IS 'Description of item'; COMMENT ON COLUMN public.stock.unit_price IS 'Price per item'; COMMENT ON COLUMN public.stock.unit IS 'Unit by which item is ordered: Each Pair Case Box'; COMMENT ON COLUMN public.stock.unit_descr IS 'Description of unit'; -- Index: stock_manu_code_idx -- DROP INDEX public.stock_manu_code_idx; CREATE INDEX stock_manu_code_idx ON public.stock USING btree (manu_code COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: stock_stock_num_idx -- DROP INDEX public.stock_stock_num_idx; CREATE INDEX stock_stock_num_idx ON public.stock USING btree (stock_num ASC NULLS LAST) TABLESPACE pg_default; COMMENT ON INDEX public.stock_stock_num_idx IS 'Index for stock numbers. Numbers may be duplicated by different manufacturers.'; -- Index: stock_stock_num_manu_code_idx -- DROP INDEX public.stock_stock_num_manu_code_idx; CREATE UNIQUE INDEX stock_stock_num_manu_code_idx ON public.stock USING btree (stock_num ASC NULLS There will be a foreign key constraint on manu_code to manufact.manu_code but that is not yet implemented. The reference to column "SHM" not existing has me confused. I am probably missing something obvious but I cannot see what the problem is. Any help would be most welcome. Thanks, -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Unencrypted messages have no legal claim to privacy Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3