From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Stéphane A(dot) Schildknecht <stephane(dot)schildknecht(at)postgresqlfr(dot)org> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Preventing a user to use implicit casts |
Date: | 2009-07-01 18:43:46 |
Message-ID: | 162867790907011143w74aefd0bof62d240286f01e43@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2009/7/1 "Stéphane A. Schildknecht" <stephane(dot)schildknecht(at)postgresqlfr(dot)org>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Is there a way to define some implicit casts so that only one specific database
> user can use them, and they're not visible to others?
no - it's not possible - maybe with some very ugly hacks - you need to
hack cache.
regards
Pavel Stehule
>
> I'm facing the case where to have same behaviour as in 8.2 for this
> "Non-character data types are no longer automatically cast to TEXT" 8.3
> improvements, I used implicit casts proposed here:
>
> http://wiki.postgresql.org/images/d/d1/Pg83-implicit-casts.sql
>
> Problem yet is I can't use slony any more to replicate data, as it falls in
> error with this kind of messages:
>
> Jul 1 17:23:20 jck20 slon[6671]: [62-1] 2009-07-01 17:23:20 CEST FATAL
> cleanupThread: "select "_gvr".cleanupEvent('10 minutes'::interval,
> 'false'::boolean); " - ERROR:
> Jul 1 17:23:20 jck20 slon[6671]: [62-2] operator is not unique: unknown ||
> integer
> Jul 1 17:23:20 jck20 slon[6671]: [62-3] LINE 1: SELECT 'PartInd_gvr_sl_log_'
> || $1 || '-node-' || $2
> Jul 1 17:23:20 jck20 slon[6671]: [62-4] ^
> Jul 1 17:23:20 jck20 slon[6671]: [62-5] HINT: Could not choose a best
> candidate operator. You might need to add explicit type casts.
> Jul 1 17:23:20 jck20 slon[6671]: [62-6] QUERY: SELECT 'PartInd_gvr_sl_log_'
> || $1 || '-node-' || $2
> Jul 1 17:23:20 jck20 slon[6671]: [62-7] CONTEXT: PL/pgSQL function
> "addpartiallogindices" line 28 at assignment
> Jul 1 17:23:20 jck20 slon[6671]: [62-8] SQL statement "SELECT
> "_gvr".addPartialLogIndices()"
> Jul 1 17:23:20 jck20 slon[6671]: [62-9] PL/pgSQL function "logswitch_finish"
> line 99 at PERFORM
>
> I'm quit disappointed, as if I let slony replicate the application, still in a
> process of migration to 8.3 correct behaviour can't be used, on the other hand
> if I add implicit casts to allow application to work, I can't replicate with slony.
>
> Thanks in advance for any help.
>
> Regards,
> - --
> Stéphane Schildknecht
> PostgreSQLFr - http://www.postgresql.fr
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFKS6OCA+REPKWGI0ERAqw1AJ9EPWbsDTp1K0glwBVW5+KCCbhcpgCggvh0
> i8A4YmH3tg3lq7eK71IaaKI=
> =wKwd
> -----END PGP SIGNATURE-----
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-07-01 21:00:36 | Re: High consumns memory |
Previous Message | Stéphane A. Schildknecht | 2009-07-01 18:11:10 | Re: Preventing a user to use implicit casts |