在postgresql函数中打印一个变量

时间:2015-10-31 15:18:03

标签: postgresql function psql

我的声明如下

@if ($view === 'label')

    @foreach ($appointments as $appointment)

        <table>
            <tr>
                <th><p>{{ $appointment->label }}</p></th>
            </tr>

                @foreach ($appointment->appointments as $label)

                    <tr>
                        <td>{{ $label->appointment }}</td>
                    </tr>

                @endforeach

        </table>

    @foreach ($appointments as $appointment)

@endif

我可以使用下面的命令,

declare
qry text;
mycur cursor is select id from my table;
begin
    qry = "update mytable id = 101 where id = " || mycur.id;
    print qry; --something like this
    execute qry;
end;

但是,我想打印qry变量(用于验证),然后我需要执行它。

我该怎么做?

0 个答案:

没有答案