pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed\df
4+ messages / 3 participants
[nested] [flat]
* \df
@ 2004-05-07 23:15 Jie Liang <jie@stbernard.com>
2004-05-07 23:29 ` Re: \df Yasir Malik <ymalik@cs.stevens-tech.edu>
2004-05-07 23:39 ` Re: \df Stefan Weiss <spaceman@foo.at>
0 siblings, 2 replies; 4+ messages in thread
From: Jie Liang @ 2004-05-07 23:15 UTC (permalink / raw)
To: pgsql-sql
Hi,
What sql statement equal to \df function_name
I want to know the result data type for a given function within plpgsql.
Thanks.
Jie Liang
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: \df
2004-05-07 23:15 \df Jie Liang <jie@stbernard.com>
@ 2004-05-07 23:29 ` Yasir Malik <ymalik@cs.stevens-tech.edu>
1 sibling, 0 replies; 4+ messages in thread
From: Yasir Malik @ 2004-05-07 23:29 UTC (permalink / raw)
To: Jie Liang <jie@stbernard.com>; +Cc: pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jie,
Start psql with the -E option. Whenever you type in a command, you will
see the query that was executed.
Yasir
On Fri, 7 May 2004, Jie Liang wrote:
> Date: Fri, 7 May 2004 16:15:52 -0700
> From: Jie Liang <jie@stbernard.com>
> To: pgsql-sql@postgresql.org
> Subject: [SQL] \df
>
> Hi,
> What sql statement equal to \df function_name
> I want to know the result data type for a given function within plpgsql.
>
>
> Thanks.
>
> Jie Liang
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iQEVAwUBQJwb+uJ7vYSSIbWdAQLw1wf/U9NQI0hsV6nFN6xkst2XNXsd+PBtsCtn
ze7lNDEiBAz9NiV6jP17KGSfpIrhJLqmPV3YaFTogqjlmF9UPO2w6XWU0626clGd
FDVb4kXpExkowY+Sakbim39JSnl1WIQyCGAyOoVl0rpQpevjdA4SIXAeYJed8G1t
D47Ox5iC5u5VlDMMGgoGu6wzdx1D+pofVY3pCZZpx5vLWEfirWLNr0Fl2pWV25d7
0TerG1rq85DiccIXXNs+iuZ9ZFf8XdnCZiQ3V/vfayubk50R6vSHNHRe2MftkML2
IEdD66AE+N2hwS/L2YDhv9Npw3K5uJhLUoHgSVmtEcQaYKZrV7gjeA==
=PUhY
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: \df
2004-05-07 23:15 \df Jie Liang <jie@stbernard.com>
@ 2004-05-07 23:39 ` Stefan Weiss <spaceman@foo.at>
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Weiss @ 2004-05-07 23:39 UTC (permalink / raw)
To: pgsql-sql
On Saturday, 08 May 2004 01:15, Jie Liang wrote:
> What sql statement equal to \df function_name
> I want to know the result data type for a given function within plpgsql.
Try the -E switch for pgsql:
spaceman@weyoun:~ $ psql -E
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
spaceman=# \df alt_to_iso
********* QUERY **********
SELECT CASE WHEN p.proretset THEN 'setof ' ELSE '' END ||
pg_catalog.format_type(p.prorettype, NULL) as "Result data type",
n.nspname as "Schema",
p.proname as "Name",
pg_catalog.oidvectortypes(p.proargtypes) as "Argument data types"
FROM pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
AND NOT p.proisagg
AND pg_catalog.pg_function_is_visible(p.oid)
AND p.proname ~ '^alt_to_iso$'
ORDER BY 2, 3, 1, 4;
**************************
List of functions
Result data type | Schema | Name | Argument data types
------------------+------------+------------+---------------------------------------------
void | pg_catalog | alt_to_iso | integer, integer, cstring, ...
(1 row)
HTH,
stefan weiss
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: \df
@ 2004-05-07 23:47 Jie Liang <jie@stbernard.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jie Liang @ 2004-05-07 23:47 UTC (permalink / raw)
To: Stefan Weiss <spaceman@foo.at>; pgsql-sql
Thanks.
Jie Liang
-----Original Message-----
From: Stefan Weiss [mailto:spaceman@foo.at]
Sent: Friday, May 07, 2004 4:40 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] \df
On Saturday, 08 May 2004 01:15, Jie Liang wrote:
> What sql statement equal to \df function_name
> I want to know the result data type for a given function within
> plpgsql.
Try the -E switch for pgsql:
spaceman@weyoun:~ $ psql -E
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
spaceman=# \df alt_to_iso
********* QUERY **********
SELECT CASE WHEN p.proretset THEN 'setof ' ELSE '' END ||
pg_catalog.format_type(p.prorettype, NULL) as "Result data type",
n.nspname as "Schema",
p.proname as "Name",
pg_catalog.oidvectortypes(p.proargtypes) as "Argument data types" FROM
pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE
p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype
AND NOT p.proisagg
AND pg_catalog.pg_function_is_visible(p.oid)
AND p.proname ~ '^alt_to_iso$'
ORDER BY 2, 3, 1, 4;
**************************
List of functions
Result data type | Schema | Name | Argument data types
------------------+------------+------------+---------------------------
------------------+------------+------------+------------------
void | pg_catalog | alt_to_iso | integer, integer, cstring,
...
(1 row)
HTH,
stefan weiss
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-05-07 23:47 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 23:15 \df Jie Liang <jie@stbernard.com>
2004-05-07 23:29 ` Yasir Malik <ymalik@cs.stevens-tech.edu>
2004-05-07 23:39 ` Stefan Weiss <spaceman@foo.at>
2004-05-07 23:47 Re: \df Jie Liang <jie@stbernard.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox