pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jwieck@debis.com
To: maillist@candle.pha.pa.us
Cc: jwieck@debis.com
Cc: Inoue@tpf.co.jp
Cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] What about LIMIT in SELECT ?
Date: Thu, 22 Oct 1998 10:53:10 +0200 (MET DST)
Message-ID: <m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <199810210609.CAA27774@candle.pha.pa.us>

> Jan, we found that I am having to require an initdb for the INET/CIDR
> type, so if you want stuff to change the views/rules for the limit
> addition post 6.4, please send them in and I will apply them.
> 
> You clearly have the syntax down, so I think you should go ahead.

    This is the part that will enable post 6.4 add of the
    LIMIT stuff without initdb.

    Regression tested.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

inline patch 1: src/backend/nodes/copyfuncs.c, src/backend/nodes/outfuncs.c, src/backend/nodes/readfuncs.c and 1 more (+17/-0 lines) download inline-1.patchdiff -cr src.orig/backend/nodes/copyfuncs.c src/backend/nodes/copyfuncs.c *** src.orig/backend/nodes/copyfuncs.c Fri Oct 16 11:53:40 1998 --- src/backend/nodes/copyfuncs.c Fri Oct 16 13:32:35 1998 *************** *** 1578,1583 **** --- 1578,1586 ---- newnode->unionClause = temp_list; } + Node_Copy(from, newnode, limitOffset); + Node_Copy(from, newnode, limitCount); + return newnode; } diff -cr src.orig/backend/nodes/outfuncs.c src/backend/nodes/outfuncs.c *** src.orig/backend/nodes/outfuncs.c Fri Oct 16 11:53:40 1998 --- src/backend/nodes/outfuncs.c Fri Oct 16 13:30:50 1998 *************** *** 259,264 **** --- 259,268 ---- appendStringInfo(str, (node->hasSubLinks ? "true" : "false")); appendStringInfo(str, " :unionClause "); _outNode(str, node->unionClause); + appendStringInfo(str, " :limitOffset "); + _outNode(str, node->limitOffset); + appendStringInfo(str, " :limitCount "); + _outNode(str, node->limitCount); } static void diff -cr src.orig/backend/nodes/readfuncs.c src/backend/nodes/readfuncs.c *** src.orig/backend/nodes/readfuncs.c Fri Oct 16 11:53:40 1998 --- src/backend/nodes/readfuncs.c Fri Oct 16 13:31:43 1998 *************** *** 163,168 **** --- 163,174 ---- token = lsptok(NULL, &length); /* skip :unionClause */ local_node->unionClause = nodeRead(true); + token = lsptok(NULL, &length); /* skip :limitOffset */ + local_node->limitOffset = nodeRead(true); + + token = lsptok(NULL, &length); /* skip :limitCount */ + local_node->limitCount = nodeRead(true); + return local_node; } diff -cr src.orig/include/nodes/parsenodes.h src/include/nodes/parsenodes.h *** src.orig/include/nodes/parsenodes.h Fri Oct 16 11:53:58 1998 --- src/include/nodes/parsenodes.h Fri Oct 16 13:35:32 1998 *************** *** 60,65 **** --- 60,67 ---- List *unionClause; /* unions are linked under the previous * query */ + Node *limitOffset; /* # of result tuples to skip */ + Node *limitCount; /* # of result tuples to return */ /* internal to planner */ List *base_rel_list; /* base relation list */ *************** *** 639,644 **** --- 641,648 ---- char *portalname; /* the portal (cursor) to create */ bool binary; /* a binary (internal) portal? */ bool unionall; /* union without unique sort */ + Node *limitOffset; /* # of result tuples to skip */ + Node *limitCount; /* # of result tuples to return */ } SelectStmt;

view thread (60+ messages)  latest in thread

Message-ID: <m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: jwieck@debis.com, maillist@candle.pha.pa.us, Inoue@tpf.co.jp, hackers@postgreSQL.org
  Subject: Re: [HACKERS] What about LIMIT in SELECT ?
  In-Reply-To: <m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de>
  References: <199810210609.CAA27774@candle.pha.pa.us> <m0zWGUY-000EBPC@orion.SAPserv.Hamburg.dsh.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox