Skip site navigation (1) Skip section navigation (2)

"=" or ":=" ?

From: BERTRAND Joël <joel(dot)bertrand(at)systella(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: "=" or ":=" ?
Date: 2008-02-28 16:21:32
Message-ID: 47C6DF8C.4080005@systella.fr (view raw or flat)
Thread:
Lists: pgsql-general
	Hello,

	I'm trying to optimize assign_vertex_id() function provided by 
pgRouting/PostGIS. In this function, I can see :

DECLARE
       points record;
       i record;
       source_id int;
       target_id int;
       pre varchar;
       post varchar;

       srid integer;
                     			
       BEGIN
                     			
	    BEGIN
	        DROP TABLE vertices_tmp;
         	EXCEPTION
			WHEN UNDEFINED_TABLE THEN
                 END;
                     						
		EXECUTE 'CREATE TABLE vertices_tmp (id serial)';	
                 							
		FOR i IN EXECUTE 'SELECT srid FROM geometry_columns WHERE 
f_table_name='''|| quote_ident(geom_table)||'''' LOOP
		END LOOP;
		
		srid := i.srid;
		
		EXECUTE 'SELECT addGeometryColumn(''vertices_tmp'', ''the_geom'', 
'||srid||', ''POINT'', 2)';
                     							 

                 CREATE INDEX vertices_tmp_idx ON vertices_tmp USING 
GIST (the_geom);
		
                 pre = '';
                 post = '';

	I don't understand last assignations. In pgsql documentation, ther is 
written that all assignations have to be written with ":=", not with 
"=". What is the difference between "=" and ":=" ? I don't find any 
information about "=".

	Regards,

	JKB

Responses

pgsql-general by date

Next:From: Alvaro HerreraDate: 2008-02-28 16:42:31
Subject: Re: initlocation on windows
Previous:From: Colin WetherbeeDate: 2008-02-28 16:18:57
Subject: Re: HELP FOR LOADING a .psql file (same question again but explained neatly)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group