Re: Combining metavariables and table names

From: H <agents(at)meddatainc(dot)com>
To: PostgreSQL Users Mailing List <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Combining metavariables and table names
Date: 2025-12-30 00:58:06
Message-ID: DFB93E2E-4C15-43E5-9BDC-A3836484C239@meddatainc.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On December 28, 2025 8:53:50 PM EST, "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>On Sunday, December 28, 2025, H <agents(at)meddatainc(dot)com> wrote:
>
>>
>> I have a feeling I might be missing how to use the combination of a
>> metavariable and a table name when used in an argument to a
>procedure.
>
>
>No, what you are doing is impossible if you limit yourself to direct
>SQL
>command syntax writing.
>
>
>> Even though I gotten it to work, what would the correct usage be?
>>
>
>I’d probably do something like:
>
>versioning(…, format(‘%I.%I’, :’s’, ‘test_history’), …)
>
>David J.

Just tried your suggestion to use format() but it resulted in a 'syntax error at or near "("'

Seems I am stuck using the approach I found to work, ie. generating a string constant in another meta variable.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message H 2025-12-30 01:01:21 Re: Combining metavariables and table names
Previous Message Igor Korot 2025-12-29 21:14:13 PQprepare result