Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 在“选择”对话框中指定多个变量_Postgresql - Fatal编程技术网

Postgresql 在“选择”对话框中指定多个变量

Postgresql 在“选择”对话框中指定多个变量,postgresql,Postgresql,我有一个带有3个变量x,y,z的函数,我需要在一个select语句中赋值 咆哮我的功能,但它是错误的 CREATE OR REPLACE FUNCTION public.teste( ) RETURNS integer LANGUAGE plpgsql AS $function$ declare resultado boolean; x int; y int; z int; BEGIN select raio, latitude, longitude into x, y,

我有一个带有3个变量x,y,z的函数,我需要在一个select语句中赋值

咆哮我的功能,但它是错误的

CREATE OR REPLACE FUNCTION public.teste( )
 RETURNS integer
 LANGUAGE plpgsql
AS $function$
 declare resultado boolean;
 x int;
 y int; 
 z int; 

BEGIN
  select raio, latitude, longitude into x, y, z  from veiculo_ancora limit 1 
    --- .... continue .... 
END;
$function$;
错误消息

SQL Error[42601]:错误:在或接近INTO时多次指定INTO 波西昂:723 org.postgresql.util.PSQLException:错误:在或接近于指定了多次 波西昂:723怎么样

SELECT raio, latitude, longitude FROM veiculo_ancora LIMIT 1 INTO x, y, z;
相反?

那么:

SELECT raio, latitude, longitude FROM veiculo_ancora LIMIT 1 INTO x, y, z;

相反?

它到底出了什么问题?你收到错误信息了吗?上面写着什么你确定你正在使用;每次陈述之后?或者只是问题本身的一个输入错误?是的,下面是错误消息SQL error[42601]:error:INTO在Posiçço或其附近多次指定:723 org.postgresql.util.PSQLException:error:INTO在Posiço或其附近多次指定:723您确定不是吗?正在使用dbeaver,我切换到pgadmin,它工作了=W它到底出了什么问题?你收到错误信息了吗?上面写着什么你确定你正在使用;每次陈述之后?或者只是问题本身的一个输入错误?是的,下面是错误消息SQL error[42601]:error:INTO在Posiçço或其附近多次指定:723 org.postgresql.util.PSQLException:error:INTO在Posiço或其附近多次指定:723您确定不是吗?正在使用dbeaver,我切换到pgadmin,成功了=我做到了。。。从veiculo_ancora limit 1中选择raio、纬度、经度为x、y、z;它在另一个工具中运行良好,我使用dbeaver,在pgadmin中运行。我做到了。。。从veiculo_ancora limit 1中选择raio、纬度、经度为x、y、z;它在另一个工具中工作得很好,我使用的是dbeaver,在pgadmin中工作。