From: | Роман Литовченко <roman(dot)lytovchenko(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | plpgsql function, comment with single quote, braces |
Date: | 2012-01-18 21:20:24 |
Message-ID: | CALvaytkAZW2xPy4tGQms8HqUamWBwg904XKEXrH86VtRXgwR6w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
This email repeats my post http://www.sql.ru/forum/actualthread.aspx?tid=908777
I used
PostgreSQL 9.1.1 on x86_64-apple-darwin10.8.0, compiled by
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot
3), 64-bit
PostgreSQL 8.4.6 on i386-apple-darwin, compiled by GCC
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
5370), 32-bit
with
postgresql-8.4-701.jdbc3.jar
postgresql-8.4-701.jdbc4.jar
postgresql-9.1-901.jdbc3.jar
postgresql-9.1-901.jdbc4.jar
for creating function like this:
<pre>
create or replace function f ()
returns void as $f$ begin
-- ' comment with single quote symbol
declare
_A_65 text := '{A}';
_B_66 text := '{B}';
_C_67 text := '{C}';
_D_68 text := '{D}';
_E_69 text := '{E}';
_F_70 text := '{F}';
_G_71 text := '{G}';
_H_72 text := '{H}';
_I_73 text := '{I}';
_J_74 text := '{J}';
_K_75 text := '{K}';
_L_76 text := '{L}';
_M_77 text := '{M}';
_N_78 text := '{N}';
_O_79 text := '{O}';
_P_80 text := '{P}';
_Q_81 text := '{Q}';
_R_82 text := '{R}';
_S_83 text := '{S}';
_T_84 text := '{T}';
_U_85 text := '{U}';
_V_86 text := '{V}';
_W_87 text := '{W}';
_X_88 text := '{X}';
_Y_89 text := '{Y}';
_Z_90 text := '{Z}';
_a_97 text := '{a}';
_b_98 text := '{b}';
_c_99 text := '{c}';
_d_100 text := '{d}';
_e_101 text := '{e}';
_f_102 text := '{f}';
_g_103 text := '{g}';
_h_104 text := '{h}';
_i_105 text := '{i}';
_j_106 text := '{j}';
_k_107 text := '{k}';
_l_108 text := '{l}';
_m_109 text := '{m}';
_n_110 text := '{n}';
_o_111 text := '{o}';
_p_112 text := '{p}';
_q_113 text := '{q}';
_r_114 text := '{r}';
_s_115 text := '{s}';
_t_116 text := '{t}';
_u_117 text := '{u}';
_v_118 text := '{v}';
_w_119 text := '{w}';
_x_120 text := '{x}';
_y_121 text := '{y}';
_z_122 text := '{z}';
begin
end;
end; $f$ language plpgsql;
</pre>
and get this in my database:
<pre>
...
CREATE OR REPLACE FUNCTION f()
RETURNS void AS
$BODY$ begin
-- ' comment
declare
_A_65 text := '{A}';
_B_66 text := '{B}';
_C_67 text := '{C}';
_D_68 text := 'DATE ';
_E_69 text := 'E';
_F_70 text := '';
_G_71 text := '{G';
_H_72 text := '{H}';
_I_73 text := '{I}';
_J_74 text := '{J}';
_K_75 text := '{K}';
_L_76 text := '{L}';
_M_77 text := '{M}';
_N_78 text := '{N}';
_O_79 text := '';
_P_80 text := '{P}';
_Q_81 text := '{Q}';
_R_82 text := '{R}';
_S_83 text := '{S}';
_T_84 text := 'TIME ';
_U_85 text := '{U}';
_V_86 text := '{V}';
_W_87 text := '{W}';
_X_88 text := '{X}';
_Y_89 text := '{Y}';
_Z_90 text := '{Z}';
_a_97 text := '{a}';
_b_98 text := '{b}';
_c_99 text := '{c}';
_d_100 text := 'DATE ';
_e_101 text := 'e';
_f_102 text := '';
_g_103 text := '{g';
_h_104 text := '{h}';
_i_105 text := '{i}';
_j_106 text := '{j}';
_k_107 text := '{k}';
_l_108 text := '{l}';
_m_109 text := '{m}';
_n_110 text := '{n}';
_o_111 text := '';
_p_112 text := '{p}';
_q_113 text := '{q}';
_r_114 text := '{r}';
_s_115 text := '{s}';
_t_116 text := 'TIME ';
_u_117 text := '{u}';
_v_118 text := '{v}';
_w_119 text := '{w}';
_x_120 text := '{x}';
_y_121 text := '{y}';
_z_122 text := '{z}';
begin
end;
end; $BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
...
</pre>
please check it.
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2012-01-18 22:30:14 | Re: plpgsql function, comment with single quote, braces |
Previous Message | Toth-Steiner, Thomas | 2012-01-18 11:49:54 | PostgreSQL JDBC Driver with Kerberos support |