Preventing a user to use implicit casts - Mailing list pgsql-general

From Stéphane A. Schildknecht
Subject Preventing a user to use implicit casts
Date
Msg-id 4A4BA382.2060801@postgresqlfr.org
Whole thread Raw
Responses Re: Preventing a user to use implicit casts
Re: Preventing a user to use implicit casts
List 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-----

pgsql-general by date:

Previous
From: Scott Mead
Date:
Subject: Re: Python client + select = locked resources???
Next
From: Scott Marlowe
Date:
Subject: Re: Preventing a user to use implicit casts