Preventing a user to use implicit casts

From: "Stéphane A(dot) Schildknecht" <stephane(dot)schildknecht(at)postgresqlfr(dot)org>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Preventing a user to use implicit casts
Date: 2009-07-01 17:57:22
Message-ID: 4A4BA382.2060801@postgresqlfr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----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?

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-----

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-07-01 18:05:46 Re: Preventing a user to use implicit casts
Previous Message Scott Mead 2009-07-01 16:34:15 Re: Python client + select = locked resources???