Re: can you give me a sql example to explain this?
От | David G. Johnston |
---|---|
Тема | Re: can you give me a sql example to explain this? |
Дата | |
Msg-id | CAKFQuwYHJeZvpdmGk0q+ESHs0tGY3N1iv34PbN6c2DajA5d-og@mail.gmail.com обсуждение исходный текст |
Ответ на | can you give me a sql example to explain this? ("jacktby@gmail.com" <jacktby@gmail.com>) |
Список | pgsql-general |
On Tue, Oct 25, 2022 at 7:54 AM jacktby@gmail.com <jacktby@gmail.com> wrote:
/*
* In a "leaf" node representing a VALUES list, the above fields are all
* null, and instead this field is set. Note that the elements of the
* sublists are just expressions, without ResTarget decoration. Also note
* that a list element can be DEFAULT (represented as a SetToDefault
* node), regardless of the context of the VALUES list. It's up to parse
* analysis to reject that where not valid.
*/
List *valuesLists; /* untransformed list of expression lists */I need to understand what this is used for?
That's a fairly broad question...does this help?
In the SQL command:
VALUES ('one', 'two', 1+2, DEFAULT)
The valuesLists List will effectively contain three elements, {'one'}, {'two'}, {1+2}, and {DEFAULT}.
Though if it contains DEFAULT and the VALUES is not part of an INSERT an error should eventually occur during parse analysis since a plain VALUES command has no context from which to retrieve a default.
David J.
В списке pgsql-general по дате отправления: