plpgsql function-parsing

From: chris <chrisk(at)pgsqlrocket(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: plpgsql function-parsing
Date: 2018-03-06 15:51:08
Message-ID: d24066d1-a3b6-89a2-bb20-beaa92f98405@pgsqlrocket.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am trying to create a function that gets passed a statement as a
string and then I need to change the table_name within the string by
adding a "_cdc" to it, then execute the statement

ex:

string passed could be GRANT all ON authors TO bob.

then

EXECUTE GRANT all ON authors_cdc TO bob

I'm looking into parsing the string but i can't find a way to parse in a
way that'll work. Any ideas?

Thanks,

Chris

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Celia McInnis 2018-03-06 16:12:43 normalizing a float array?
Previous Message David G. Johnston 2018-03-06 14:40:19 Re: What is wrong with my pgadmin?