I solved the problem with:
CREATE FUNCTION myfunc ... RETURNS Token[] ... SET search_path to rdb;
I still don't know why it happens in the first place, though.
On Thu, Feb 6, 2025 at 12:14 PM Tom Lane wrote:
> "David G. Johnston" writes:
> > On Thu, Feb 6, 2025 at
REATE FUNCTION my_func ... RETURNS Token[] ...
No amount of fiddling with the syntax seems to help. RETURN rdb.Token[], RETURN
"rdb.Token"[], RETURN "rdb.Token[]" all fail.
This problem is happening in pg17. Haven't tried other versions.
Is there a solution here?
--
Chris Cleveland
312-339-2677 mobile
r the limit,
instead of later?
--
Chris Cleveland
312-339-2677 mobile
just a normal index scan, but with the ability to do
custom things with the quals and the projection.
So... what's the best approach?
Is there any sample code that does this? A search of github doesn't turn up
much.
Is there any way to do this without duplicating everything in
node
or that, though:
IndexScanDesc.xs_orderbyvals. If there were a way for the system to use
that instead of a call to the ordering function, we'd be all set.
It would also be nice if the orderbyval could be made available in the
projection. That way we could report the score() in the result set.
Matthias' response and links touch on some of these issues.
--
Chris Cleveland
312-339-2677 mobile
nfo,
but I can't figure out where or why it's getting set.
Here's a sample query. I have not found a query that does *not* call
rank_match():
SELECT *
FROM products
WHERE products <===> rdb.userquery('teddy')
ORDER BY products <<=>> rdb.rank();
I'd be grateful for any help or insights.
--
Chris Cleveland
312-339-2677 mobile
ess method is designed such that you have to fetch the entire result
set in one go. It's not streaming, like most access methods. As such, it
would be very helpful to know up front how many items I need to fetch from
the index.
--
Chris Cleveland
312-339-2677 mobile
nscan);
amroutine.amrescan = Some(scan::amrescan);
amroutine.amgettuple = Some(scan::amgettuple);
amroutine.amgetbitmap = None; // Some(scan::ambitmapscan);
amroutine.amendscan = Some(scan::amendscan);
amroutine.ammarkpos = None;
amroutine.amrestrpos = None;
/* interface functions to support parallel index scans */
amroutine.amestimateparallelscan = None;
amroutine.aminitparallelscan = None;
amroutine.amparallelrescan = None;
amroutine.into_pg_boxed()
}
--
Chris Cleveland
312-339-2677 mobile
fire up a background worker to do the job, but it would be a lot
simpler to call please_launch_autovacuum_right_now();
--
Chris Cleveland
312-339-2677 mobile
that case we make a custom PathTarget for it.
*
*For example, an indexscan might return index expressions that would *
otherwise need to be explicitly calculated.*
--
Chris Cleveland
312-339-2677 mobile
simple example of a custom scan? Or maybe a
tutorial?
--
Chris Cleveland
312-339-2677 mobile
baseobject.objectId = parent_oid;
baseobject.objectSubId = 0;
segobject.classId = IndexRelationId;
segobject.objectId = child_oid;
segobject.objectSubId = 0;
recordDependencyOn(&segobject, &baseobject, DEPENDENCY_INTERNAL);
}
The code where I use heap_create_with_catalog() is substantially the same.
--
Chris Cleveland
312-339-2677 mobile
I'm building a Postgres index access method. For a variety of reasons it's
more efficient to store the index data in multiple physical files on disk
rather in the index's main fork.
I'm trying to create separate rels that can be created and destroyed by the
parent index access method. I've succeed
etFreeIndexPage() with a
lightweight lock, although I wonder if that would harm performance. Perhaps
there is a more performant way to do this deep down in the FSM code.
Thoughts?
--
Chris Cleveland
312-339-2677 mobile
It's turning out to be difficult to store the data for my custom index
access method in the main fork. Breaking up the data into pages with page
headers means a lot of extra work, a big performance hit, and disk space
management headaches. It's just not a good fit for my particular file
format.
It
I'm writing an index access method with its own unique file format. It
involves storing large blobs that break across pages.
The file format itself doesn't need or use page headers. There's no need
for a checksum or to manage free space within the page.
Can I treat pages as just a flat, open 8k b
I'm working on a table access method that stores indexes in a structure
that looks like an LSM tree. Changes get written to small segment files,
which then get merged into larger segment files.
It's really tough to manage these files using existing fork/buffer/page
files, because when you delete a
I'm developing a new index access method. Sometimes the planner uses it and
sometimes it doesn't. I'm trying to debug the process to understand why the
index does or doesn't get picked up.
Is there a way to dump all of the query plans that the planner considered,
along with information on why they
Pointer to 64 bits now preclude a
variable-length TID in the future? Or make it more difficult?
How much work would it take?
Since the thread ended in May, has the group reached any kind of
consensus on the issue?
--
Chris Cleveland
312-339-2677 mobile
ks to widen the TID?
I saw some notes on this in the Zedstore project, but there hasn't been
much activity in that project for almost a year.
Chris
--
Chris Cleveland
312-339-2677 mobile
and attach it only to the first row.
Is this possible?
Is it possible to do it with a table access method, as opposed to an
index access method?
--
Chris Cleveland
312-339-2677 mobile
>
> Are you implementing a new index AM or a new table AM? Discarding data
> based on something like a relevance score doesn't seem like something
> that either API provides for. Indexes in Postgres can be lossy, but
> that in itself doesn't change the result of queries.
>
(Sorry if this doesn't q
is not going to work unless the system gives the index a clear picture
of transactions, visibility, and deletes as they happen. Is this
information available?
On Mon, Jul 19, 2021 at 6:58 PM Peter Geoghegan wrote:
> On Mon, Jul 19, 2021 at 4:31 PM Chris Cleveland
> wrote:
> &g
an. I'm guessing that all that magically happens in the
storage and buffer managers.
So... how do I handle this? Is there some way for me to implement my own
storage manager that manages visibility?
I'd be grateful for any guidance.
--
Chris Cleveland
312-339-2677 mobile
Noob here. I'm getting started on building a Postgres extension.
I'd like to add some keywords/clauses to the SELECT statement. For my
particular application, the syntax with new keywords would be way better
than trying to do it through functions alone. I would add some new keywords
followed by ex
25 matches
Mail list logo