isbn_sum:= CASE
WHEN substring($1 from i for 1) IN (''X'',''x'') AND
i=10 THEN isbn_sum + (11-i * 10)
ELSE isbn_sum + (11-i * substring($1 from i for
1)::int)
END;
END LOOP;
e utilities schema)
you can use 3245342::oid::regclass::text to find the path of a table given
it's oid.This does take into account the current schema_path settings, so
use of this cast may or may not schema-qualify the table name depending on
the schema_path setting.
--
Tom Hebbron
www.hebbron.
og.pg_attribute.attname - linked to
the oid in pg_class of the index.
select
c.oid::regclass,
i.*,
ia.attname
from pg_catalog.pg_class c
inner join pg_catalog.pg_index i ON (i.indrelid = c.oid)
inner join pg_catalog.pg_attribute ia ON (i.indexrelid = ia.attrelid);
should
Here's a slightly condensed version - do SQL functions have an advantage in
that they can be inlined? Or have I misunderstood?
CREATE OR REPLACE FUNCTION user_in_group(name,name) RETURNS boolean STRICT
AS '
SELECT EXISTS(SELECT u.* FROM pg_catalog.pg_user u INNER JOIN
pg_catalog.pg_group g ON (u.
s. I imagine that
someone who has worked with SGML before would be able to knock up this
transformation pretty quick(?) so I'll try appealing here before getting
my hands dirty attempting to try it myself.
Is there any reason not to have the system objects commented in this way
in the