Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 555873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:51:37+00:00 2026-05-13T11:51:37+00:00

CREATE OR REPLACE FUNCTION _chkLogin(userid varchar, pwd varchar) RETURNS BOOLEAN AS $BODY$ DECLARE passed

  • 0
CREATE OR REPLACE FUNCTION _chkLogin(userid varchar, pwd varchar)
RETURNS BOOLEAN AS
$BODY$
DECLARE 
 passed BOOLEAN;
BEGIN
 SELECT  (_password = $2) FROM _vRegistration WHERE _userid = $1;
 RETURN passed;
END;
$BODY$
LANGUAGE 'plpgsql';

When am executing the code above am getting the following error,

SELECT _chkLogin('username','abcd') as passed;

ERROR: query has no destination for
result data

I’ve used perform then i get a different problem,

PERFORM _chkLogin('username','abcd');

ERROR: syntax error at or near
“perform”

Suggest me what should I be doing in order to overcome this error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:51:37+00:00Added an answer on May 13, 2026 at 11:51 am

    You do return passed but you never assign value to it.

    And select command within the function has to have place to put data to.

    So. Change your SQL to:

    SELECT  (_password = $2) INTO passed FROM _vRegistration WHERE _userid = $1;
    

    Also – since you’re using names for variables (userid, pwd) use them:

    SELECT  (_password = pwd) INTO passed FROM _vRegistration WHERE _userid = userid;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It sounds like you're building a universal armv6/armv7 binary for… May 16, 2026 at 5:17 pm
  • Editorial Team
    Editorial Team added an answer Should you remove old versions? Up to you. You'll certainly… May 16, 2026 at 5:17 pm
  • Editorial Team
    Editorial Team added an answer Everybody thinks about garbage collection the wrong way: A correctly-written… May 16, 2026 at 5:17 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have this function: CREATE OR REPLACE FUNCTION CREATE_AIRSPACE_AVAILABILITY_RECORD (cur_user VARCHAR, start_time VARCHAR, start_date
I have a problem in postgres function: CREATE OR REPLACE FUNCTION linkedRepoObjects(id bigint) RETURNS
i am using this function in a trigger: CREATE OR REPLACE FUNCTION xx() RETURNS
I have function CREATE OR REPLACE FUNCTION public.GetSoilCod ( cod1 integer = 0, cod2
Given the following function: create or replace FUNCTION GETADDRESSES RETURN sys_refcursor IS address_cursor sys_refcursor;
Working solution: CREATE OR REPLACE FUNCTION my_search(tsq tsquery, translation_id integer, lang regconfig, count integer
I got some SQL function CREATE OR REPLACE FUNCTION tools.update_company(IN company_id integer, OUT value
I have the following function: CREATE OR REPLACE FUNCTION GetVarchar2 (iclCLOB IN Nvarchar2) return
i have the following function: create or replace FUNCTION MXUPGKEYVAL(tbname varchar2,colname varchar2) return number
Iam having problem creating postgresql function in plperl CREATE OR REPLACE FUNCTION zm_json (TEXT,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.