Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfKca-001Tzb-7f for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Feb 2025 15:13:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tfKcZ-004ZVG-AZ for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Feb 2025 15:13:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfKcZ-004ZV6-0r for pgsql-bugs@lists.postgresql.org; Tue, 04 Feb 2025 15:13:51 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tfKcW-003Fh8-0p for pgsql-bugs@lists.postgresql.org; Tue, 04 Feb 2025 15:13:50 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4361f796586so67264515e9.3 for ; Tue, 04 Feb 2025 07:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1738682028; x=1739286828; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=bRdAce+o73Ic53ros0+WUMIpQqeCaiYPObZMSiPF4YU=; b=akSsOPTxnacA6DWpAZn94861U9RM5tDlFd1xDioA2/2D1jGOSuMMIylXl71Ha/TTUj sEhci3Hlu95wb65EVu3hineVXwoIBYqzZSg8U87VTLLJoU2e0zdW0FftCcs0CpdFAzQM wnP31YPj8KjEmestbyqLTkTZybQjP+UjGUhwF9K4wVVSVXf1XF0dl6F85U6NdAwEKU9Z xS77CK9rKkL37mpwYS4tWRn+oj+yS2S6HTD6tM4IwTKvJHkuwJiut1mQazjBSccyG/VO sllK4PukvzKp9vhQFHmBj8HSS1VMVAEtvE01r9QMaN2c/MJNBBIpayp78J8OkgtnjVFV b5OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738682028; x=1739286828; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bRdAce+o73Ic53ros0+WUMIpQqeCaiYPObZMSiPF4YU=; b=jzyUGqUNd4IhdnlLl5vbxk1yNGf0acXZapbniM4OBt3K/67qoTcByw28YhpfKJl2qZ fD8ktKiVku9/+5lzULwaSjdHC8TLsmWJoou6650/HZX6Whu4lvs/4siSfB4r9Y+pPtRJ 1nK6R16dQZGCykkIeSjcbD9VoUD0xS7kb44idAQzrrAJx9XERgWbl/VgSWqrPvUvThsI N9TwcPg868xjvdDyKsX7dGrnapaOuxeUVuGgVcEwT5uaOqRtDFrbSEeMuAAZtC4nb2Dz DITRTd1h9m/o7nZp/O+kwsgVgFTDP/ni/oTHi6VNhK9Z1WuVksdqD+tKOl4q92Lz+xlo aJkQ== X-Forwarded-Encrypted: i=1; AJvYcCUbxiQd0OdSLJpNJzuz9mMFEyYxCghxaJo5s5uNx5cyYy913W1sgv3cPy+BIRDitJQI6DSpsv8kGWPx@lists.postgresql.org X-Gm-Message-State: AOJu0YyZkiGBVctsj7slt5v09r13HY9pYDFX4IaLRwSldxJHz9XcCPm3 6YvYp3I/Wurt2IdmcsSLMZwJJVEbQ+eiDuxGCODG4z5jXnrQ2ck2ynZRfAL8Ui8= X-Gm-Gg: ASbGncv2C44jVUlnnLq54w7zqCu8+BLus3WlABJWDfcQU7czPIuD+mNtULE/qPzNS2w Y8Z4bq9MYsTLATMS/RNp3Bs+27zOMJLpJf90fIUde701+Tqyxwv/c+3fP8eu72vk3lqNMrymqPF 1epqPR9JZkNap62eYl5hnf9jz14aToyBxDX5Or84SkbsNSZN/r/CxqYeSJEQiUJx/QW1ZRVS72a YWC6lRfq9rhw7bsgjtDVcwnxINAYil1hkvuUEdbpQd7HGtzUngrgZM0uGr6piF01GE4KydoNEzj L5rgOOAyPz3OZ+TBAINNBbWpibcmx3d/lXw= X-Google-Smtp-Source: AGHT+IEzqtEif72xe3ITMDqmePFyV4LtV79Bfh0GtuKvxUwuBUrgSCJtT3nzDQUn4rgS7nMUdrgYeA== X-Received: by 2002:a05:600c:19d0:b0:434:f4fa:83c4 with SMTP id 5b1f17b1804b1-438dc4250cdmr274967225e9.29.1738682027636; Tue, 04 Feb 2025 07:13:47 -0800 (PST) Received: from localhost.localdomain ([2001:871:5e:6a19:921e:c11c:4bad:350a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c5c1cf364sm15948746f8f.88.2025.02.04.07.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2025 07:13:47 -0800 (PST) Message-ID: <65eb4d7a46a2759dc2583f274bf50d16811caebe.camel@cybertec.at> Subject: Re: BUG #18793: PLpgSQL Function Returning Type of Table is not match for varchar(n) data type via Return Query From: Laurenz Albe To: ugurlu2001@hotmail.com, pgsql-bugs@lists.postgresql.org Date: Tue, 04 Feb 2025 16:13:46 +0100 In-Reply-To: <18793-07a72289887f0966@postgresql.org> References: <18793-07a72289887f0966@postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2025-02-04 at 12:43 +0000, PG Bug reporting form wrote: > I have a set of "Functions" that I created dynamically with PLPgSQL and a= re > connected to each other in a chain. >=20 > The first function dynamically creates the second function. The second > function returns a set of values with a dynamic "Return Query" statement = and > a reference to "Returns Table (field1 type1, field2 type2 .... )". >=20 > Basically, the result set seems to return exactly the desired result. The > exception is the varchar(n) fixed-length data type. Although the result s= et > is expected to be varchar(n) -a fixed-length value is expected-, a result= of > type character varying (length indeterminate) is obtained. >=20 > [...] >=20 > As far as I have determined, the Postgresql database engine somehow retur= ns > the varchar(n) - Fixed Length - data type as a "character varying" - > indefinite length data type. >=20 > I hope this situation, which I observed as a problem, will be fixed as so= on > as possible. That is working asdesigned. Why is it a problem for you? Yours, Laurenz Albe