Re: Combining metavariables and table names - Mailing list pgsql-general

From H
Subject Re: Combining metavariables and table names
Date
Msg-id DFB93E2E-4C15-43E5-9BDC-A3836484C239@meddatainc.com
Whole thread Raw
In response to Re: Combining metavariables and table names  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Combining metavariables and table names
List pgsql-general
On December 28, 2025 8:53:50 PM EST, "David G. Johnston" <david.g.johnston@gmail.com> wrote:
>On Sunday, December 28, 2025, H <agents@meddatainc.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.



pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: PQprepare result
Next
From: H
Date:
Subject: Re: Combining metavariables and table names