dbTalk Databases Forums  

quote style in buffer

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss quote style in buffer in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
joseph speigle
 
Posts: n/a

Default quote style in buffer - 02-01-2004 , 04:40 AM






hi,

I can't seem to find the comment for an sql file

drop function dups();
-- joe speigle
-- Feb 1 2004
CREATE FUNCTION dups() RETURNS int4
AS 'SELECT 1 as RESULT' LANGUAGE 'sql';
this always stops after the first line. I've tried a leading space/tab/single quote/double space and the same after the hyphens to no avail.

thanks!!
--
joe speigle

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #2  
Old   
Michael Glaesemann
 
Posts: n/a

Default Re: quote style in buffer - 02-01-2004 , 07:53 AM






Hi Joseph,

On Feb 1, 2004, at 7:40 PM, joseph speigle wrote:

Quote:
hi,

I can't seem to find the comment for an sql file

drop function dups();
-- joe speigle
-- Feb 1 2004
CREATE FUNCTION dups() RETURNS int4
AS 'SELECT 1 as RESULT' LANGUAGE 'sql';
it looks like you've got at least one extra pair of single quotes: you
don't need to quote sql.

test=# CREATE OR REPLACE FUNCTION dups() RETURNS int4
test-# AS 'SELECT 1 as RESULT' LANGUAGE SQL;
CREATE FUNCTION
test=# select * from dups();
dups
------
1
(1 row)

Hope that helps.

Michael Glaesemann
grzm myrealbox com


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: quote style in buffer - 02-01-2004 , 10:16 AM



joseph speigle <joe.speigle (AT) jklh (DOT) us> writes:
Quote:
I can't seem to find the comment for an sql file

drop function dups();
-- joe speigle
-- Feb 1 2004
CREATE FUNCTION dups() RETURNS int4
AS 'SELECT 1 as RESULT' LANGUAGE 'sql';
this always stops after the first line.
It looks just fine as you've shown it. Define "stops" --- what did you
do exactly, and what happened exactly?

The only theory that comes to mind right away is that what you think are
newlines are not really, so that the database is seeing the file as one
long line.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.