BUG #1375: Problem with Dollar qouting functions
От | Tony Caduto |
---|---|
Тема | BUG #1375: Problem with Dollar qouting functions |
Дата | |
Msg-id | 200501080504.j0854MEF001092@developer.pgadmin.org обсуждение исходный текст |
Ответы |
Re: BUG #1375: Problem with Dollar qouting functions
|
Список | pgsql-bugs |
The following bug has been logged online: Bug reference: 1375 Logged by: Tony Caduto Email address: tony.caduto@amsoftwaredesign.com PostgreSQL version: 8.0 Operating system: Gentoo Linux Description: Problem with Dollar qouting functions Details: I restored my 7.4.x database to the latest RC, which has several schemas each with about 30 to 50 functions. I pull out the source for one of the functions and build a valid function structure so I can edit it(in notepad for example), and because this is 8.0 I replace the single qoutes we used to have to use around the function body with dollar qoutes, specificly $BODY$. Example: CREATE or REPLACE FUNCTION system.spsys_user_delete( int4) RETURNS pg_catalog.void AS $BODY$ DECLARE USERID_IN alias for $1; username varchar; BEGIN select user_name from system.system_user_information where user_id = USERID_IN into username; update system.SYSTEM_USER_INFORMATION set deleted = 1 where USER_ID = USERID_IN; return void; END $BODY$ LANGUAGE 'plpgsql' VOLATILE; I then run my function in my query editor and all the linefeeds are striped out, so the next time I open it I get the entire function body back as one long string with all the EOL markers gone. Here is the interesting part, if I go though and add new EOL markers by hitting the enter key, then save it, it works without problem and the EOL markers do not get striped out. There appears to be a problem with functions that have been restored from 7.4.x and dollar quoting, after it has been saved once, then the EOL markers replaced the problem goes away. The issue does not seem to affect new functions created on 8.0.
В списке pgsql-bugs по дате отправления: