Re: Localizing stored functions by replacing placeholders in their body

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Localizing stored functions by replacing placeholders in their body
Date: 2021-03-02 15:57:43
Message-ID: CAADeyWirC2phhvAs1fagnOr1zDxCx+RRzZ+1yCym3FfTO2jVbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, good point about the '\$', thank you Tom.

The reason I am trying not to use sed, is because I deploy my database by
executing a single command:

psql words_en < words_en.sql

And the file words_en.sql has the contents:

\i words_hash.sql
\i words_all_letters.sql
\i words_get_hint.sql
\i words_get_notification.sql
\i ../words_common.sql
\i words_valid_tile.sql
\i words_get_moves.sql
\i words_answer_puzzle.sql
\i words_rare_letter_1.sql
\i words_rare_letter_2.sql

And then the ../words_common.sql creates tables and has 40 more "\i" calls.

So I was hoping to have some SQL command to localize my stored functions.

Best regards
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2021-03-02 16:17:51 Re: Localizing stored functions by replacing placeholders in their body
Previous Message Tom Lane 2021-03-02 15:27:55 Re: Localizing stored functions by replacing placeholders in their body