Re: Have psql display names and OUT/INOUT in \df output - Mailing list pgsql-patches

From Neil Conway
Subject Re: Have psql display names and OUT/INOUT in \df output
Date
Msg-id 1153034472.5069.12.camel@localhost
Whole thread Raw
In response to Re: Have psql display names and OUT/INOUT in \df output  (David Fetter <david@fetter.org>)
Responses Re: Have psql display names and OUT/INOUT in \df output
List pgsql-patches
On Sat, 2006-07-15 at 23:16 -0700, David Fetter wrote:
> Anyhow, please find enclosed the context-style diff.

How carefully did you test this?

postgres=# \df abc
                   List of functions
 Schema | Name | Result data type | Argument data types
--------+------+------------------+---------------------
 public | abc  | integer          | a integer,b integer
(1 row)

(The argument list should be separated by both a comma and whitespace.)

postgres=# create or replace function xyz(inout a int, inout int)
returns record as 'select (1, 2);' language sql;
CREATE FUNCTION
postgres=# \df xyz
                          List of functions
 Schema | Name | Result data type |       Argument data types
--------+------+------------------+----------------------------------
 public | xyz  | record           |  INOUT a integer, INOUT  integer
(1 row)

(Spurious whitespace for the unnamed INOUT parameter.)

You need to schema-qualify references to builtin functions, to avoid
accidentally using functions of the same name that appear earlier in the
user's search path. (As a general rule, look at the surrounding code
carefully before you modify it.)

It would be nice to be consistent about SQL style, at least within a
single query (e.g. don't separate function arguments with whitespace in
some places but not others).

-Neil



pgsql-patches by date:

Previous
From: David Fetter
Date:
Subject: Re: Have psql display names and OUT/INOUT in \df output
Next
From: David Fetter
Date:
Subject: Re: Have psql display names and OUT/INOUT in \df output