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: PostgreSQL vs SQL Standard - Mailing list pgsql-hackers
From
Brad DeJong
Subject
Re: PostgreSQL vs SQL Standard
Date
June 30, 2018
22:42:44
Msg-id
CAJnrtnxrV_Nbfs1SZD6CmfB0dfAtGfKGLmLOED02M47RzdOZwg@mail.gmail.com
Whole thread
Raw
In response to
PostgreSQL vs SQL Standard
(Andrew Gierth <andrew@tao11.riddles.org.uk>)
List
pgsql-hackers
Tree view
On Sat, Jun 9, 2018 at 8:37 PM, Andrew Gierth
<
andrew@tao11.riddles.org.uk
>
wrote:
> I think I got all the issues I currently know of, but there may be
> more, and others may disagree with my classification of issues or the
> rationales for violating the spec. Any feedback?
Related to, but I think distinct from
"Trailing spaces in character(n)"
Trailing spaces in char(n) values are removed in contexts where the spec requires they be kept.
E021-03 Character literals subclause 5.3, "<literal>": <quote> [ <character representation>... ] <quote>
In subclause 5.3 (SQL standard 2011 part 2: foundation), <character string literal> is defined (ignoring
the character set specifier and the weird multi-line continuations) as
<character string literal> ::=
<quote> [ <character representation>... ] <quote>
syntax rule 17 states
"The declared type of a <character string literal> is fixed-length character string."
In PostgreSQL, the same syntax (
<quote> [ <character representation>... ] <quote>)
is a string constant and in
the PostgreSQL documentation, section 4.1.2 constants, it says that string constants are one
of the three kinds of implicitly typed constants.
Where you see the difference is that trailing spaces in a string constant are retained when the type
is resolved to text, but if the constant was typed as bpchar and then cast to text, the trailing spaces
would be trimmed.
https://www.postgresql.org/message-id/28069.1501269327%40sss.pgh.pa.us
https://www.postgresql.org/message-id/9524.1511311751%40sss.pgh.pa.us
You also see that the type of a string constant is implicit in cases where PostgreSQL is
unable to determine the type of a string constant from its context.
https://www.postgresql.org/message-id/1405965382386-5812247.post%40n5.nabble.com
I could be reading some of this incorrectly, but putting it all together, it looks to me like
PostgreSQL does not meet a strict interpretation of E021-03.
I'd put it in the WONTFIX section.
pgsql-hackers
by date:
Previous
From:
Arseny Sher
Date:
30 June 2018, 21:00:21
Subject:
Re: pgsql: Fix "base" snapshot handling in logical decoding
Next
From:
Peter Geoghegan
Date:
30 June 2018, 23:56:37
Subject:
Re: Fix to not check included columns in ANALYZE on indexes
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
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