From 976246cc7e4d8b673fc62fe6daa61c76d94af1af Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 24 Aug 2002 15:00:47 +0000 Subject: The cstring datatype can now be copied, passed around, etc. The typlen value '-2' is used to indicate a variable-width type whose width is computed as strlen(datum)+1. Everything that looks at typlen is updated except for array support, which Joe Conway is working on; at the moment it wouldn't work to try to create an array of cstring. --- src/bin/psql/describe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin/psql/describe.c') diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 538672954e..562d5a7f96 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright 2000-2002 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.63 2002/08/22 00:01:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.64 2002/08/24 15:00:46 tgl Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -196,7 +196,7 @@ describeTypes(const char *pattern, bool verbose) if (verbose) appendPQExpBuffer(&buf, " t.typname AS \"%s\",\n" - " CASE WHEN t.typlen = -1\n" + " CASE WHEN t.typlen < 0\n" " THEN CAST('var' AS pg_catalog.text)\n" " ELSE CAST(t.typlen AS pg_catalog.text)\n" " END AS \"%s\",\n", -- cgit v1.2.1