Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
Re: [HACKERS] [PATCH] Generic type subscripting - Mailing list pgsql-hackers
From
Dmitry Dolgov
Subject
Re: [HACKERS] [PATCH] Generic type subscripting
Date
November 8, 2017
02:00:43
Msg-id
CA+q6zcX3nL_u3hf7Ofwb=ERANgZMX+PBJf0u96X3+bAR9Db=kQ@mail.gmail.com
Whole thread
Raw
In response to
Re: [HACKERS] [PATCH] Generic type subscripting
(Arthur Zakirov <a.zakirov@postgrespro.ru>)
Responses
Re: [HACKERS] [PATCH] Generic type subscripting
List
pgsql-hackers
Tree view
> On 31 October 2017 at 16:05, Arthur Zakirov <
a.zakirov@postgrespro.ru
> wrote:
> Documentation is compiled. But there are warnings about end-tags. Now it is necessary to have full named end-tags
Fixed, thanks for noticing.
> I think it is necessary to check Oids of subscripting_parse, subscripting_assign, subscripting_fetch. Maybe within TypeCreate().
Yes, I agree. I implemented it in a way that all subscripting-related functions
must be provided if `subscripting_parse` is there - in this case if you want to
prevent assign or fetch, you can just do it inside a corresponding function and
it allows to provide a custom message about that.
> > +Datum
> > +custom_subscripting_parse(PG_FUNCTION_ARGS)
> > +{
> > + bool isAssignment = PG_GETARG_BOOL(0);
>
> Here isAssignment is unused variable, so it could be removed.
In this case I disagree - the purpose of these examples is to show everything
you can use. So I just need to come up with some example that involves
`isAssignment`.
> > + scratch->d.sbsref.eval_finfo = eval_finfo;
> > + scratch->d.sbsref.nested_finfo = nested_finfo;
> > +
> As I mentioned earlier we need assigning eval_finfo and nested_finfo only for EEOP_SBSREF_OLD, EEOP_SBSREF_ASSIGN and EEOP_SBSREF_FETCH steps.
> Also they should be assigned before calling ExprEvalPushStep(), not after. Otherwise some bugs may appear in future.
I'm really confused about this one. Can you tell me the exact line numbers?
Because if I remove any of these lines "blindly", tests are failing.
> > - ArrayRef *aref = makeNode(ArrayRef);
> > + NodeTag sbstag = nodeTag(src_expr);
> > + Size nodeSize = sizeof(SubscriptingRef);
> > + SubscriptingRef *sbsref = (SubscriptingRef *) newNode(nodeSize, sbstag);
>
> Is there necessity to use newNode() instead using makeNode(). The previous code was shorter.
Good catch! It was a leftover from the version when I had two different nodes
for subscripting.
> There is no changes in execnodes.h except removed line. So I think execnodes.h could be removed from the patch.
Fixed.
Attachment
0001-Base-implementation-of-subscripting-mechanism.patch
0002-Subscripting-for-array.patch
0003-Subscripting-for-jsonb.patch
0004-Subscripting-documentation.patch
pgsql-hackers
by date:
Previous
From:
Andres Freund
Date:
08 November 2017, 01:32:00
Subject:
Re: [HACKERS] [POC] Faster processing at Gather node
Next
From:
Robert Haas
Date:
08 November 2017, 02:41:36
Subject:
Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies