1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Implement types regprocedure, regoper, regoperator, regclass, regtype

per pghackers discussion.  Add some more typsanity tests, and clean
up some problems exposed thereby (broken or missing array types for
some built-in types).  Also, clean up loose ends from unknownin/out
patch.
This commit is contained in:
Tom Lane
2002-04-25 02:56:56 +00:00
parent 4eac3919dd
commit 52200befd0
28 changed files with 1638 additions and 229 deletions

View File

@ -1,10 +1,10 @@
findoidjoins
This program scans a database, and prints oid fields (also regproc fields)
and the tables they join to. CAUTION: it is ver-r-r-y slow on a large
database, or even a not-so-large one. We don't really recommend running
it on anything but an empty database, such as template1.
This program scans a database, and prints oid fields (also regproc, regclass
and regtype fields) and the tables they join to. CAUTION: it is ver-r-r-y
slow on a large database, or even a not-so-large one. We don't really
recommend running it on anything but an empty database, such as template1.
Uses pgeasy library.

View File

@ -39,7 +39,9 @@ main(int argc, char **argv)
WHERE a.attnum > 0 AND \
relkind = 'r' AND \
(typname = 'oid' OR \
typname = 'regproc') AND \
typname = 'regproc' OR \
typname = 'regclass' OR \
typname = 'regtype') AND \
a.attrelid = c.oid AND \
a.atttypid = t.oid \
ORDER BY 2, a.attnum ; \
@ -77,7 +79,7 @@ main(int argc, char **argv)
DECLARE c_matches BINARY CURSOR FOR \
SELECT count(*)::int4 \
FROM \"%s\" t1, \"%s\" t2 \
WHERE RegprocToOid(t1.\"%s\") = t2.oid ",
WHERE t1.\"%s\"::oid = t2.oid ",
relname, relname2, attname);
doquery(query);