On 5/25/07, Bernd Helmle <mailings@oopsware.de> wrote:
> --On Freitag, Mai 25, 2007 00:02:06 +0000 Jaime Casanova
> <systemguards@gmail.com> wrote:
> >>
> >
> > sounds good. can we see the new patch?
>
> Attached tablespace.c.diff shows my current changes to use an OID lookup
> list.
>
> >
+ if (source >= PGC_S_INTERACTIVE && IsTransactionState())
+ {
+ /*
+ * Verify that all the names are valid tablespace names
+ * We do not check for USAGE rights should we?
+ */
+ Oid cur_tblspc = get_tablespace_oid(curname);
+ if (cur_tblspc == InvalidOid)
+ {
+ ereport((source == PGC_S_TEST) ? NOTICE : ERROR,
+ (errcode(ERRCODE_UNDEFINED_OBJECT),
+ errmsg("tablespace \"%s\" does not exist", curname)));
+ }
+ else
+ {
+ /*
+ * Append new OID to temporary list. We can't
+ * use the lookup table directly, because there could
+ * be an ereport() in subsequent loops.
+ */
+ oidlist = lappend_oid(oidlist, cur_tblspc);
+ }
+ }
the list of oid's is only filled when you execute
SET temp_tablespaces = 'somelist'
but if you use the GUC in postgresql.conf at startup then not, so the
temp_tablespaces are not used even if they are setted
can you do that outside
+ if (source >= PGC_S_INTERACTIVE && IsTransactionState())
--
regards,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning." Richard Cook