Re: [HACKERS] Quoting in stored procedures

From: pgsql-hackers(at)mail(dot)remote(dot)org
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Quoting in stored procedures
Date: 1999-08-30 20:54:30
Message-ID: 19990830225430.A10255@remote.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> and why not something like:
>
> CREATE FUNCTION first_word ( :x CHAR VARYING(1000) )
> RETURNS CHAR VARYING(40)
> LANGUAGE SQL
> RETURN TRIM (SUBSTRING ((:X || ' ') FROM 1 FOR POSITION (' ' IN (:X || '')
> )));
>
> as described in SQL/PSM (SQL Persistent Stored Modules) (see "A Guide To The
> SQL Standard" apendix E)
> instead of re-invent the wheel. ;)

Because the SQL parser has to parse the stored procedure to find the end. In
postgres you can have embedded tcl and any arbitrary language, so it is quite
difficult to handle that properly.

jochen

Browse pgsql-hackers by date

  From Date Subject
Next Message Hub.Org News Admin 1999-08-30 20:54:58
Previous Message Massimo Dal Zotto 1999-08-30 20:42:37 Re: [HACKERS] PostgreSQL 6.5.2