From c0e6ce75193dbf1a1febe876a6ddddf08b5ad5be Mon Sep 17 00:00:00 2001
From: Joseph <Joseph.xu@efrei.net>
Date: Mon, 6 Feb 2023 08:57:55 -0500
Subject: update with sort in c code

---
 src/exchangedb/exchange_do_get_link_data.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'src/exchangedb/exchange_do_get_link_data.sql')

diff --git a/src/exchangedb/exchange_do_get_link_data.sql b/src/exchangedb/exchange_do_get_link_data.sql
index a76f4aaaf..08611a5ea 100644
--- a/src/exchangedb/exchange_do_get_link_data.sql
+++ b/src/exchangedb/exchange_do_get_link_data.sql
@@ -13,11 +13,7 @@
 -- You should have received a copy of the GNU General Public License along with
 -- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
 --
-/*DROP FUNCTION exchange_do_refund_by_coin(
-  IN in_coin_pub BYTEA,
-  IN in_merchant_pub BYTEA,
-  IN in_h_contract BYTEA
-);*/
+
 CREATE OR REPLACE FUNCTION exchange_do_get_link_data(
   IN in_coin_pub BYTEA
 )
@@ -53,7 +49,11 @@ LOOP
          ON (tp.melt_serial_id=rrc.melt_serial_id)
        JOIN denominations denoms
          ON (rrc.denominations_serial=denoms.denominations_serial)
-       WHERE rrc.melt_serial_id =i.melt_serial_id;
+       WHERE rrc.melt_serial_id =i.melt_serial_id
+/*       GROUP BY tp.transfer_pub, denoms.denom_pub, rrc.ev_sig,rrc.ewv,rrc.link_sig,rrc.freshcoin_index, rrc.coin_ev*/
+       ORDER BY tp.transfer_pub,
+       rrc.freshcoin_index ASC
+       ;
 END LOOP;
 CLOSE curs;
 END $$;
-- 
cgit v1.2.3

