From: | Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table. |
Date: | 2024-12-19 12:07:51 |
Message-ID: | CADrsxdZX7y6ngAtgOMjB=eG=g856K5i5Z67KBvyyqbGX7euNXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 17, 2024 at 10:12 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Oct 9, 2024 at 7:12 AM Nishant Sharma
> <nishant(dot)sharma(at)enterprisedb(dot)com> wrote:
> > I have included them in v3. v3 does not allow empty schema_name &
> > table_name options along with column_name.
>
> I was looking at these patches today and trying to understand whether
> the proposed error message is consistent with what we have done
> elsewhere.
>
> The proposed error message was "cannot use empty value for option
> \"%s\". I looked for error messages that contained the phrase "empty"
> or "zero". I did not find a case exactly like this one. The closet
> analogues I found were things like this:
>
> invalid cursor name: must not be empty
> output cannot be empty string
> DSM segment name cannot be empty
> row path filter must not be empty string
>
> These messages aren't quite as consistent as one might wish, so it's a
> little hard to judge here. Nonetheless, I propose that the error
> message we use here should end with either "cannot" or "must not"
> followed by either "be empty" or "be empty string". I think my
> preferred variant would be "value for option \"%s\" must not be empty
> string". But there's certainly oodles of room for bikeshedding.
>
> Apart from that, I see very little to complain about here. Once we
> agree on the error message text I think something can be committed.
> For everyone's convenience, I suggest merging the two patches into
> one. I highly approve of separating patches by topic, but there's
> usually no point in separating them by directory.
>
> --
> Robert Haas
> EDB: http://www.enterprisedb.com
Thanks Robert for your response and the review comments!
I have addressed both your suggestions, by changing the error
message and merging both the patches to one.
PFA, patch set v4.
Regards,
Nishant.
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Disallow-empty-Foreign-Table-column_name-schema_n.patch | application/octet-stream | 5.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey M. Borodin | 2024-12-19 12:10:05 | Re: Fix bank selection logic in SLRU |
Previous Message | jian he | 2024-12-19 12:02:20 | speedup COPY TO for partitioned table. |